[dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail update on aarch64
Stephen Hemminger
stephen at networkplumber.org
Thu Apr 29 17:05:42 CEST 2021
On Thu, 29 Apr 2021 14:35:35 +0000
Ruifeng Wang <Ruifeng.Wang at arm.com> wrote:
> > -----Original Message-----
> > From: Stephen Hemminger <stephen at networkplumber.org>
> > Sent: Thursday, April 29, 2021 1:17 AM
> > To: Ruifeng Wang <Ruifeng.Wang at arm.com>
> > Cc: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>; Konstantin
> > Ananyev <konstantin.ananyev at intel.com>; dev at dpdk.org;
> > david.marchand at redhat.com; thomas at monjalon.net; jerinj at marvell.com;
> > nd <nd at arm.com>; Gavin Hu <Gavin.Hu at arm.com>; Steve Capper
> > <Steve.Capper at arm.com>; Ola Liljedahl <Ola.Liljedahl at arm.com>
> > Subject: Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail
> > update on aarch64
> >
> > On Sun, 25 Apr 2021 05:56:53 +0000
> > Ruifeng Wang <ruifeng.wang at arm.com> wrote:
> >
> > > Instead of polling for tail to be updated, use wfe instruction.
> > >
> > > Signed-off-by: Gavin Hu <gavin.hu at arm.com>
> > > Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > > Reviewed-by: Steve Capper <steve.capper at arm.com>
> > > Reviewed-by: Ola Liljedahl <ola.liljedahl at arm.com>
> > > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > > Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
> >
> > Looks ok to me, but it does raise an interesting question.
> > Shouldn't the original code have been using atomic load to look at ht->tail.
> >
> > This another place where "volatile considered harmful" applies.
>
> Do you mean 'volatile' should be removed from rte_wait_until_equal_xxx parameters?
>
I meant that all access to tail should be via C11 atomic builtin. At that point,
the volatile on the data structure elements does not matter.
More information about the dev
mailing list