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 12F13A00C3; Mon, 3 Oct 2022 12:01:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0CB640695; Mon, 3 Oct 2022 12:01:47 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 6EAF940693 for ; Mon, 3 Oct 2022 12:01:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664791305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S96hb47Z4OT6gGyb7bSWVD5jGSaepIVu5b3JIByujx4=; b=XGbg4q4/GWmcxWASDFnoAq0qOzkAV6gNDuI7GOEw5Z/+0z8dpMJKVMdvDiuQ7pAk6nC7JX sZ6oMGUOWtgrHZC/B9YU1DKetLvZHo5lxu/NT2EADF19XwbrwcUi3zJhU0JEqBrb20rKhr 1Ew4k+d0FUEr1VBb7kx9sedLwk2iATk= Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-622-6PsPHX04MfSF5M8IOUbcsw-1; Mon, 03 Oct 2022 06:01:44 -0400 X-MC-Unique: 6PsPHX04MfSF5M8IOUbcsw-1 Received: by mail-pf1-f197.google.com with SMTP id i123-20020a626d81000000b005617d0e0d2cso1211341pfc.0 for ; Mon, 03 Oct 2022 03:01:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=S96hb47Z4OT6gGyb7bSWVD5jGSaepIVu5b3JIByujx4=; b=g4ppwIMmASJ7c3HXb9I59PirFs4CYxineTfU6Uv1Boh4iWxK3nbzY17dKlkAlnclzg WOQ51G1M6dma4S0uRUMXlj2uYAKhdopXihVkWQXJl9zHaTpINv1kB/AzmYOOO+IbdqxW 2Ag9Uir/EGR/XokYngHycQyOMOpvi6sXXEpVzll/GqNSb0rjFoGk3yNGn+IYwCH+HX/i zU3o6UOLa4lqEGocJvHhVJosTDMuhcA7IAhbef7xiXyHiMhUUBA1l40W44jCoFK1RDrq YLkOUUf6xgMxjoxrQ/B/Rgp5DlSMUsNuLBKwAUGh2JCNN8k4If9pF8GLRfuK5sgF2Hyc KPNg== X-Gm-Message-State: ACrzQf0j2dX6Hsosv5mMxEWGCSyCAUqQR+HqF8I8f36/HuSzygnOZJGh FfcuUxWVaGR5DKpRT09Z71M3CrQ+KniOAhVtDuULfujnU6wodUhWGVDU5vPv1AjroPgf/eqBzDD 3234rlReFFiT+mDXQj9k= X-Received: by 2002:a63:8ac7:0:b0:445:80ef:2b8 with SMTP id y190-20020a638ac7000000b0044580ef02b8mr9511144pgd.120.1664791303998; Mon, 03 Oct 2022 03:01:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7U+QzW8u29pYySLRkGndPH4aJXEKttlT5jAPhh5BJGQ+6z12OSQMGCYf8PIstxxs1EsgZvqPc8Q121WFHTwWw= X-Received: by 2002:a63:8ac7:0:b0:445:80ef:2b8 with SMTP id y190-20020a638ac7000000b0044580ef02b8mr9511123pgd.120.1664791303744; Mon, 03 Oct 2022 03:01:43 -0700 (PDT) MIME-Version: 1.0 References: <20220707201226.618611-1-stephen@networkplumber.org> <20220719202750.563166-1-stephen@networkplumber.org> In-Reply-To: <20220719202750.563166-1-stephen@networkplumber.org> From: David Marchand Date: Mon, 3 Oct 2022 12:01:32 +0200 Message-ID: Subject: Re: [PATCH v2] rwlock: prevent readers from starving writers To: Stephen Hemminger Cc: dev@dpdk.org, =?UTF-8?Q?Morten_Br=C3=B8rup?= X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Tue, Jul 19, 2022 at 10:28 PM Stephen Hemminger wrote: > > Modify reader/writer lock to avoid starvation of writer. The previous > implementation would cause a writer to get starved if readers kept > acquiring the lock. The new version uses an additional bit to indicate > that a writer is waiting and which keeps readers from starving the > writer. > > Signed-off-by: Stephen Hemminger > Acked-by: Morten Br=C3=B8rup Applied, thanks. --=20 David Marchand