[dpdk-dev] [PATCH v10 0/3] generic rte atomic APIs deprecate proposal

Phil Yang Phil.Yang at arm.com
Mon Jul 20 09:06:42 CEST 2020


> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Friday, July 17, 2020 9:59 PM
> To: Phil Yang <Phil.Yang at arm.com>
> Cc: thomas at monjalon.net; dev <dev at dpdk.org>; Mcnamara, John
> <john.mcnamara at intel.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli at arm.com>; David Christensen
> <drc at linux.vnet.ibm.com>; jerinj at marvell.com; Ananyev, Konstantin
> <konstantin.ananyev at intel.com>; Ola Liljedahl <Ola.Liljedahl at arm.com>;
> Bruce Richardson <bruce.richardson at intel.com>; Ruifeng Wang
> <Ruifeng.Wang at arm.com>; nd <nd at arm.com>
> Subject: Re: [PATCH v10 0/3] generic rte atomic APIs deprecate proposal
> 
> On Fri, Jul 17, 2020 at 12:15 PM Phil Yang <phil.yang at arm.com> wrote:
> >
> > DPDK provides generic rte_atomic APIs to do several atomic operations.
> > These APIs are using the deprecated __sync builtins and enforce full
> > memory barriers on aarch64. However, full barriers are not necessary
> > in many use cases. In order to address such use cases, C language offers
> > C11 atomic APIs. The C11 atomic APIs provide finer memory barrier control
> > by making use of the memory ordering parameter provided by the user.
> > Various patches submitted in the past [2] and the patches in this series
> > indicate significant performance gains on multiple aarch64 CPUs and no
> > performance loss on x86.
> >
> > But the existing rte_atomic API implementations cannot be changed as the
> > APIs do not take the memory ordering parameter. The only choice available
> > is replacing the usage of the rte_atomic APIs with C11 atomic APIs. In
> > order to make this change, the following steps are proposed:
> >
> > [1] deprecate rte_atomic APIs so that future patches do not use rte_atomic
> > APIs (a script is added to flag the usages).
> > [2] refactor the code that uses rte_atomic APIs to use c11 atomic APIs.
> >
> > This patchset contains:
> > 1) changes to programmer guide describing writing efficient code for
> aarch64.
> > 2) wraps up __atomic_thread_fence with explicit memory ordering
> parameter.
> > 3) the checkpatch script changes to flag rte_atomicNN_xxx and
> rte_smp_[r/w]mb
> > APIs usage in patches.
> 
> Series applied, thanks.
> 
> The removal of the legacy atomic will be in a future release.
> Can you prepare a patch updating the deprecation notices to announce
> this removal?
> This will be the occasion to discuss the timing.

Sure. I think after complete converting for all the drivers and libraries, we can start to remove the legacy atomic APIs.
I will prepare a patch for that announcement. We can discuss the details in that thread.

Thanks,
Phil


More information about the dev mailing list