> -----Original Message----- > From: David Marchand <david.march...@redhat.com> > Sent: Friday, July 17, 2020 9:59 PM > To: Phil Yang <phil.y...@arm.com> > Cc: tho...@monjalon.net; dev <dev@dpdk.org>; Mcnamara, John > <john.mcnam...@intel.com>; Honnappa Nagarahalli > <honnappa.nagaraha...@arm.com>; David Christensen > <d...@linux.vnet.ibm.com>; jer...@marvell.com; Ananyev, Konstantin > <konstantin.anan...@intel.com>; Ola Liljedahl <ola.liljed...@arm.com>; > Bruce Richardson <bruce.richard...@intel.com>; Ruifeng Wang > <ruifeng.w...@arm.com>; nd <n...@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.y...@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