From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DDEBBA0032; Sat, 9 Jul 2022 18:23:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B63A4021F; Sat, 9 Jul 2022 18:23:18 +0200 (CEST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id C79CB4021E for ; Sat, 9 Jul 2022 18:23:16 +0200 (CEST) Received: by mail-pj1-f50.google.com with SMTP id o15so1506127pjh.1 for ; Sat, 09 Jul 2022 09:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=71IfTmOExUT7iSoVIwHLv7fPGbiAzP+pK9Zl77rISBM=; b=2T3P7f0ICWIE+PmTfx4t7QIndc3RqLzlyn8A1SycVR3QGRx/8NMbAXdqjcv/KSUz5r +ro5we1MtEuu5PlqE2wJ/K/qDlZFNuos/4VdRkMYfLnIa+7++X3pBwFpEdXeG6H8V/B6 1tZuxsEafENeJ21/sJ0Dkf6RaaWuZ7X2iA9r8auh4LZHCEIOAloWo4BIPOimUsIdq8YB XcaKVbZb2seT5aoaK8v91snw6+vyC0Vw5ui/pfrjcFldxJzUPNw74AIFq1exux4sK4Fy S5NHc6EJ72OjiBvQgSpDi6/42tvUd6g23a0F26cCbFdKiLSc9H7QyZb4HIIq5YQSfqa2 vUIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=71IfTmOExUT7iSoVIwHLv7fPGbiAzP+pK9Zl77rISBM=; b=VAcwgoXcS8atkliye1yj73l0+d7q3xEfRX4w4WQdP4lbNlgZOcdC1HulXW13HWGgDD +IzmnocNrY4nvX2AnP244CKKuWDUikAktktW4hg0MMtP+EIIlDmHth26nPiW/rAq9k/M 7bkl23i38FofXM1q4WkUOV2RxH5tLj0BND2fEZyHlrQU+WzGu9Arx6CNgQQNVWvj5WtU hXMV5zPeJRHl9qIfR/ipLDcwLM3M2tZnfS6P3e+KohpC93O353LYMoxWJUAcLV9sjJOj jkjmLY3jR4LmQsAQ+tcYAVydNurUF4tScIVgVM2N+HEmcG1cO/tYTh22iXt9KECfwNGS IF2Q== X-Gm-Message-State: AJIora9WA9WfXDlUdDYvRROn33AU+soqmYlwk/5/9a3DS/L0/oM2jh4N jbUZO8w4C7UtkGT6+ln02xgiBX1pwjw0UHSV X-Google-Smtp-Source: AGRyM1v+c+KU2U7flYwej5/XSNAb3LN2R1GXd9bVCYekSYv/JXbJbVZd7YX3m90dCaYdXyzvSeHOJw== X-Received: by 2002:a17:90b:1bc5:b0:1ee:9563:2fca with SMTP id oa5-20020a17090b1bc500b001ee95632fcamr6664941pjb.87.1657383795808; Sat, 09 Jul 2022 09:23:15 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id bm24-20020a656e98000000b003fd9b8b865dsm1343033pgb.0.2022.07.09.09.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Jul 2022 09:23:14 -0700 (PDT) Date: Sat, 9 Jul 2022 09:22:45 -0700 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Honnappa Nagarahalli" , , "nd" Subject: Re: [RFC] rwlock: prevent readers from starving writers Message-ID: <20220709092245.3fa00c66@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D871BB@smartserver.smartshare.dk> References: <20220707201226.618611-1-stephen@networkplumber.org> <98CBD80474FA8B44BF855DF32C47DC35D871BB@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sat, 9 Jul 2022 00:04:27 +0200 Morten Br=C3=B8rup wrote: > > > typedef struct { > > > - volatile int32_t cnt; /**< -1 when W lock held, > 0 when R locks =20 > > held. =20 > > > */ > > > + volatile int32_t cnt; =20 >=20 > Not signed anymore, so consider uint32_t. Suggest also rename to cnt_stat= e or similar, since it is not just a counter anymor I tried that but the rte_wait_until is using signed value.