From: Gavin Hu <Gavin.Hu@arm.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: nd <nd@arm.com>,
"david.marchand@redhat.com" <david.marchand@redhat.com>,
"thomas@monjalon.net" <thomas@monjalon.net>,
"jerinj@marvell.com" <jerinj@marvell.com>,
Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
Ruifeng Wang <Ruifeng.Wang@arm.com>,
Phil Yang <Phil.Yang@arm.com>, Joyce Kong <Joyce.Kong@arm.com>,
nd <nd@arm.com>
Subject: Re: [dpdk-dev] [PATCH v1 2/2] ring: use wfe to wait for ring tail update on aarch64
Date: Sun, 26 Apr 2020 08:41:41 +0000 [thread overview]
Message-ID: <VI1PR08MB5376318CB24F009FC985645F8FAE0@VI1PR08MB5376.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <BYAPR11MB33017E60CE1FD1CEEB4970A59AD00@BYAPR11MB3301.namprd11.prod.outlook.com>
Hi Konstantin,
> -----Original Message-----
> From: Ananyev, Konstantin <konstantin.ananyev@intel.com>
> Sent: Friday, April 24, 2020 9:24 PM
> To: Gavin Hu <Gavin.Hu@arm.com>; dev@dpdk.org
> Cc: nd <nd@arm.com>; david.marchand@redhat.com;
> thomas@monjalon.net; jerinj@marvell.com; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; Phil Yang <Phil.Yang@arm.com>; Joyce Kong
> <Joyce.Kong@arm.com>
> Subject: RE: [dpdk-dev] [PATCH v1 2/2] ring: use wfe to wait for ring tail
> update on aarch64
>
>
> >
> > Instead of polling for tail to be updated, use wfe instruction.
> >
> > Signed-off-by: Gavin Hu <gavin.hu@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Reviewed-by: Steve Capper <steve.capper@arm.com>
> > Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> > ---
> > lib/librte_ring/rte_ring_c11_mem.h | 4 ++--
> > lib/librte_ring/rte_ring_generic.h | 3 +--
> > 2 files changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/lib/librte_ring/rte_ring_c11_mem.h
> b/lib/librte_ring/rte_ring_c11_mem.h
> > index 0fb73a337..764d8f186 100644
> > --- a/lib/librte_ring/rte_ring_c11_mem.h
> > +++ b/lib/librte_ring/rte_ring_c11_mem.h
> > @@ -2,6 +2,7 @@
> > *
> > * Copyright (c) 2017,2018 HXT-semitech Corporation.
> > * Copyright (c) 2007-2009 Kip Macy kmacy@freebsd.org
> > + * Copyright (c) 2019 Arm Limited
> > * All rights reserved.
> > * Derived from FreeBSD's bufring.h
> > * Used as BSD-3 Licensed with permission from Kip Macy.
> > @@ -21,8 +22,7 @@ update_tail(struct rte_ring_headtail *ht, uint32_t
> old_val, uint32_t new_val,
> > * we need to wait for them to complete
> > */
> > if (!single)
> > - while (unlikely(ht->tail != old_val))
> > - rte_pause();
> > + rte_wait_until_equal_relaxed_32(&ht->tail, old_val);
> >
> > __atomic_store_n(&ht->tail, new_val, __ATOMIC_RELEASE);
> > }
> > diff --git a/lib/librte_ring/rte_ring_generic.h
> b/lib/librte_ring/rte_ring_generic.h
> > index 953cdbbd5..682852783 100644
> > --- a/lib/librte_ring/rte_ring_generic.h
> > +++ b/lib/librte_ring/rte_ring_generic.h
> > @@ -23,8 +23,7 @@ update_tail(struct rte_ring_headtail *ht, uint32_t
> old_val, uint32_t new_val,
> > * we need to wait for them to complete
> > */
> > if (!single)
> > - while (unlikely(ht->tail != old_val))
> > - rte_pause();
> > + rte_wait_until_equal_relaxed_32(&ht->tail, old_val);
>
> ./lib/librte_ring/rte_ring_generic.h:26:3: error: implicit declaration of
> function 'rte_wait_until_equal_relaxed_32'; did you mean
> 'rte_wait_until_equal_32'? [-Werror=implicit-function-declaration]
> rte_wait_until_equal_relaxed_32(&ht->tail, old_val);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sorry for the leakage, fixed in v2.
>
> BTW, after patch #1 compilation fails also:
> ../lib/librte_eal/x86/include/rte_spinlock.h:125:24: error: pointer targets in
> passing argument 1 of 'rte_try_tm' differ in signedness [-Werror=pointer-
> sign]
> if (likely(rte_try_tm(&sl->locked)))
Fixed in v2, thanks!
> ^
>
>
>
> >
> > ht->tail = new_val;
> > }
> > --
> > 2.17.1
next prev parent reply other threads:[~2020-04-26 8:41 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 7:07 [dpdk-dev] [PATCH v1 0/2] Use WFE for spinlock and ring Gavin Hu
2020-04-24 7:07 ` [dpdk-dev] [PATCH v1 1/2] spinlock: use wfe to reduce contention on aarch64 Gavin Hu
2020-04-24 7:07 ` [dpdk-dev] [PATCH v1 2/2] ring: use wfe to wait for ring tail update " Gavin Hu
2020-04-24 13:23 ` Ananyev, Konstantin
2020-04-26 8:41 ` Gavin Hu [this message]
2020-04-24 14:46 ` Honnappa Nagarahalli
2020-04-26 8:33 ` Gavin Hu
2020-04-26 8:39 ` [dpdk-dev] [PATCH v2 0/2] Use WFE for spinlock and ring Gavin Hu
2020-05-01 9:47 ` Ananyev, Konstantin
2020-05-03 14:54 ` David Marchand
2020-05-03 21:31 ` Honnappa Nagarahalli
2020-09-25 14:30 ` David Marchand
2021-03-25 14:58 ` David Marchand
2021-04-25 6:06 ` Ruifeng Wang
2021-04-25 15:56 ` Thomas Monjalon
2020-04-26 8:39 ` [dpdk-dev] [PATCH v2 1/2] spinlock: use wfe to reduce contention on aarch64 Gavin Hu
2020-04-28 12:22 ` Jerin Jacob
2020-04-26 8:39 ` [dpdk-dev] [PATCH v2 2/2] ring: use wfe to wait for ring tail update " Gavin Hu
2021-04-25 5:56 ` [dpdk-dev] Use WFE for spinlock and ring Ruifeng Wang
2021-04-25 5:56 ` [dpdk-dev] [PATCH v3 1/2] spinlock: use wfe to reduce contention on aarch64 Ruifeng Wang
2021-04-25 5:56 ` [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail update " Ruifeng Wang
2021-04-26 5:38 ` Jerin Jacob
2021-04-28 17:17 ` Stephen Hemminger
2021-04-29 14:35 ` Ruifeng Wang
2021-04-29 15:05 ` Stephen Hemminger
2021-05-07 8:25 ` Ruifeng Wang
2021-04-28 7:42 ` [dpdk-dev] Use WFE for spinlock and ring David Marchand
2021-04-28 9:30 ` Ruifeng Wang
2021-04-28 11:13 ` Thomas Monjalon
2021-04-29 14:28 ` Ruifeng Wang
2021-04-29 15:20 ` Thomas Monjalon
2021-04-30 9:16 ` Bruce Richardson
2021-04-30 13:41 ` Honnappa Nagarahalli
2021-04-30 14:19 ` Bruce Richardson
2021-05-07 10:18 ` Ruifeng Wang
2021-05-07 10:24 ` Bruce Richardson
2021-07-05 8:51 ` David Marchand
2021-07-05 10:21 ` Ruifeng Wang
2021-07-07 14:47 ` Stephen Hemminger
2021-07-08 9:41 ` Ruifeng Wang
2021-07-08 16:58 ` Honnappa Nagarahalli
2021-07-07 5:43 ` [dpdk-dev] [PATCH v4 0/3] " Ruifeng Wang
2021-07-07 5:43 ` [dpdk-dev] [PATCH v4 1/3] spinlock: use wfe to reduce contention on aarch64 Ruifeng Wang
2021-07-07 5:43 ` [dpdk-dev] [PATCH v4 2/3] ring: use wfe to wait for ring tail update " Ruifeng Wang
2021-07-07 5:43 ` [dpdk-dev] [PATCH v4 3/3] build: add option to enable wait until equal Ruifeng Wang
2021-07-07 12:15 ` David Marchand
2021-07-07 5:48 ` [dpdk-dev] [PATCH v4 0/3] Use WFE for spinlock and ring Ruifeng Wang
2021-07-07 5:48 ` [dpdk-dev] [PATCH v4 1/3] spinlock: use wfe to reduce contention on aarch64 Ruifeng Wang
2021-07-07 5:48 ` [dpdk-dev] [PATCH v4 2/3] ring: use wfe to wait for ring tail update " Ruifeng Wang
2021-07-07 5:48 ` [dpdk-dev] [PATCH v4 3/3] build: add option to enable wait until equal Ruifeng Wang
2021-07-07 6:32 ` Thomas Monjalon
2021-07-07 6:46 ` Ruifeng Wang
2021-07-07 12:27 ` Bruce Richardson
2021-07-07 12:36 ` Jerin Jacob
2021-07-08 6:25 ` Ruifeng Wang
2021-07-08 6:32 ` Jerin Jacob
2021-07-08 7:32 ` Thomas Monjalon
2021-07-08 9:21 ` Ruifeng Wang
2021-07-08 10:28 ` Thomas Monjalon
2021-07-09 18:39 ` [dpdk-dev] [PATCH v4 0/3] Use WFE for spinlock and ring Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR08MB5376318CB24F009FC985645F8FAE0@VI1PR08MB5376.eurprd08.prod.outlook.com \
--to=gavin.hu@arm.com \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Joyce.Kong@arm.com \
--cc=Phil.Yang@arm.com \
--cc=Ruifeng.Wang@arm.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=konstantin.ananyev@intel.com \
--cc=nd@arm.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).