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

David Marchand david.marchand at redhat.com
Fri Jul 17 15:58:32 CEST 2020


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.


-- 
David Marchand



More information about the dev mailing list