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 BC0F6A0547; Fri, 29 Oct 2021 15:55:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AACD14111F; Fri, 29 Oct 2021 15:55:47 +0200 (CEST) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) by mails.dpdk.org (Postfix) with ESMTP id D4DFB411B6 for ; Fri, 29 Oct 2021 15:55:46 +0200 (CEST) Received: by mail-io1-f45.google.com with SMTP id g8so11296979iob.10 for ; Fri, 29 Oct 2021 06:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GZ0UPAuNXynPCmBR5GBZs3ciPPO5+jwuRV+JcdwfwAA=; b=DZQViOZ9hs4p9UALYmHdf4n2C+rI/yUJl9ewWEsgCf1BTRVgcxRLcYm0SgekLrdGhW qjHgQLYrbOpWHffXOQPs4mb1MiXQOAviMCTj41Nk1L0HPzHmkMZvmptOhccHyNFzvcur kXGZETKxZqTLTPXbHyPidEI67krHRb/qzc8eZF9hOf6IbzVEXyi4xMd74zob4vYEo30n wJ2wNIDEmheKb5qKL8Swzc4fz75NHoj89N3dgd42Ig5blRhClNTdjJP8Ye3VajSQLy/C +LDPcrvTpA+1Z1sscvQThg9v1wKaj6CxmbQ/j1wykYxBCPphTGaloSNb8RedDXTcc38a VJew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GZ0UPAuNXynPCmBR5GBZs3ciPPO5+jwuRV+JcdwfwAA=; b=QRzUEJIvNmXEY5V7L1cy1NIFnrJSjVQntBC6Lz4/axGO6Pv1UcLQfaL5pW4Kqc2G2Q raYcPjX9ziyPrkQsqJoGcikmWn2tv83vdXFUEXQGTCUtnmBDvrDSmQQdi2swm4+Knxsa IK5v2yb2L8gsP0j769KYdlXArtUqtPyor3xkw39eR2n4eqvBLqx0VLquQDtoNbu61VZ6 YlqLy+5IfcYtZynuQ4J9jQ+zsquotsWbCP9wWBLCkvo//2ihYWc5Uq1dFcAVt2QS0yVX QmaDacfhn0vC7CBBy6Lh3KMhfQZhZJ2jJOTfBnG4o/pS3JIUWtfaVc2QyZ6v6a7vUN3D z2pQ== X-Gm-Message-State: AOAM533n1QX5qjrEOYnKbplv2K2hO+7csyvrVHuYC9KuW6KOAaCs6XcB xOVRk9gYFpUSA3nQBOodbH4x5nnlJ8fgCSF3c/U= X-Google-Smtp-Source: ABdhPJy8KO5kgZj9kHQNIn8F/Qk+WFd0sZxXfKrnkpMYCyFchTcRgV/L/I84ozP8wN0Owv6iOmLGqS37UQ7dg2KJOMg= X-Received: by 2002:a05:6638:22d2:: with SMTP id j18mr8398393jat.15.1635515746324; Fri, 29 Oct 2021 06:55:46 -0700 (PDT) MIME-Version: 1.0 References: <20210902053253.3017858-1-feifei.wang2@arm.com> <20211029082021.945586-1-feifei.wang2@arm.com> <20211029082021.945586-3-feifei.wang2@arm.com> In-Reply-To: <20211029082021.945586-3-feifei.wang2@arm.com> From: Jerin Jacob Date: Fri, 29 Oct 2021 19:25:20 +0530 Message-ID: To: Feifei Wang Cc: dpdk-dev , nd , Stephen Hemminger , David Marchand , Thomas Monjalon , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , "Ananyev, Konstantin" , Ruifeng Wang Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v8 2/5] eal: use wait event for read pflock 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 Sender: "dev" On Fri, Oct 29, 2021 at 1:50 PM Feifei Wang wrote: > > Instead of polling for read pflock update, use wait event scheme for > this case. > > Signed-off-by: Feifei Wang > Reviewed-by: Ruifeng Wang Acked-by: Jerin Jacob > --- > lib/eal/include/generic/rte_pflock.h | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/lib/eal/include/generic/rte_pflock.h b/lib/eal/include/generic/rte_pflock.h > index e57c179ef2..7573b036bf 100644 > --- a/lib/eal/include/generic/rte_pflock.h > +++ b/lib/eal/include/generic/rte_pflock.h > @@ -121,9 +121,7 @@ rte_pflock_read_lock(rte_pflock_t *pf) > return; > > /* Wait for current write phase to complete. */ > - while ((__atomic_load_n(&pf->rd.in, __ATOMIC_ACQUIRE) > - & RTE_PFLOCK_WBITS) == w) > - rte_pause(); > + rte_wait_event(&pf->rd.in, RTE_PFLOCK_WBITS, ==, w, __ATOMIC_ACQUIRE); > } > > /** > -- > 2.25.1 >