[dpdk-dev] [PATCH v2 1/5] lib/stack: fix inconsistent weak / strong cas

Eads, Gage gage.eads at intel.com
Mon Sep 28 17:58:33 CEST 2020


> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Monday, September 28, 2020 5:23 AM
> To: Steven Lariau <steven.lariau at arm.com>; Eads, Gage <gage.eads at intel.com>
> Cc: Olivier Matz <olivier.matz at 6wind.com>; dev <dev at dpdk.org>; nd
> <nd at arm.com>
> Subject: Re: [dpdk-dev] [PATCH v2 1/5] lib/stack: fix inconsistent weak / strong
> cas
> 
> On Fri, Sep 25, 2020 at 7:44 PM Steven Lariau <steven.lariau at arm.com> wrote:
> >
> > Fix cmpexchange usage of weak / strong.
> > The generated code is the same on x86 and ARM (there is no weak
> > cmpexchange), but the old usage was inconsistent.
> > For push and pop update size, weak is used because cmpexchange is inside
> > a loop.
> > For pop update root, strong is used even though cmpexchange is inside a
> > loop, because there may be a lot of operations to do in a loop iteration
> > (locate the new head).
> 
> Is this patch backport material?

It's not a bugfix. It could help performance on a system with weak
cmpexchange -- e.g. the pop-update change would ensure no spurious
failures (which the code can handle, but would require another relatively
expensive pass through the pop loop.)

Thanks,
Gage


More information about the dev mailing list