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 1113AA0032; Sat, 9 Jul 2022 18:25:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EA6A4021F; Sat, 9 Jul 2022 18:25:35 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 358864021E for ; Sat, 9 Jul 2022 18:25:34 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id l12so1178446plk.13 for ; Sat, 09 Jul 2022 09:25:34 -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=uyfMEpADOQh4GAs0AimwtqvEm6MRnGpbZPOwtlZUizo=; b=6axjm/8eD8suxybfBU0/BJFCm0+qT5T0crhigSjPkP+kGiqXFz0IbZh+noSafau5RW 4zLugSTOvZ8hs5VIswGY9TsKk8T4ljm0/nSeWELa+7MJoKJzqgU1mVNzIzwObTZYnz/i TowsPo2wdWbfgrTdIb3Rcl51ufNLxhPzvKBXUMfs7vAJk48eWEJZ6pAOv99vMD3dwjG3 YRj3klcwl3y29Qz6q0bdmF9mkNhtyqcE6Co7laClqh3KlxpOH1KXt6TkOj3xCruTLvox tEqPe99yh3pc6z6x3ptHGgdUWO2CvGJu2PM/Ul7YzNwYaf6wnE4C6/zHNjkzBsSziC00 3w7A== 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=uyfMEpADOQh4GAs0AimwtqvEm6MRnGpbZPOwtlZUizo=; b=BWtCd1Ymgu2FpumAG5RykOaiHMmC1w0HNb+aT56Zr/KGVU4Ma8JpAa1x2gwbz7BeYm 4UKxb3gBxxhhA9aABmKsISrNSBLHBo8aNWekme0Y+E4VSTP2Bz5AYAx/L2z9cmKjzsgq 6uc1PJ4o92dK3WAfFmJkBFbWng1RPIb1gGxiddLSC+358XGw9rjIyWUL+IOtdXG9q9q4 vXE+O0aWoKVv7oyF/YaLofzLZOTXk6DSritWF3fSLio8DtB0j68782ddK3Zl1DcxWYlP l1rGNBkKIb/7sVLpI6V/e7k2MjCU4uGqDHG2AlhD5bhT0wVZmnPNhYxkkE9JPTFo9P14 hmjA== X-Gm-Message-State: AJIora8PSb06s7Z5K104wn+XYasLYJyAlk7QctWPHs6w59VDqo2e/bZx lsKp3xTrd7ppga3qiVf2gEzHwQ== X-Google-Smtp-Source: AGRyM1tpU5fVdC/k/I9bmKRb8FZjHStM3GDiWbfMQcUxW0IeOQSOp+8f4jQlCLW/OQRvUJZ0g/yy2w== X-Received: by 2002:a17:902:e5c5:b0:16b:ff65:d5a4 with SMTP id u5-20020a170902e5c500b0016bff65d5a4mr9483135plf.151.1657383932988; Sat, 09 Jul 2022 09:25:32 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id 186-20020a6219c3000000b005289753448fsm1655266pfz.123.2022.07.09.09.25.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Jul 2022 09:25:32 -0700 (PDT) Date: Sat, 9 Jul 2022 09:25:28 -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: <20220709092528.68397bf0@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: > Always the creative mind, Stephen. :-) >=20 > You might consider adding/updating even more comments. >=20 > Acked-by: Morten Br=C3=B8rup The motivation is that our work load is reader/writer lock heavy with small number of threads. Therefore the number of atomic operations per lock matters, but starving is bad. And any compare-exchange on ARM is expensive and should be avoided if possible. The concept here came from this great page. https://locklessinc.com/articles/locks/ Will add link in next version.