Thread (49 messages) 49 messages, 8 authors, 2021-07-30

Re: [dpdk-dev] [PATCH v2 0/8] use GCC's C11 atomic builtins for test

From: Honnappa Nagarahalli <hidden>
Date: 2021-06-17 23:26:18

<snip>
On Tue, Jun 15, 2021 at 09:54:51PM -0500, Joyce Kong wrote:
quoted
Since C11 memory model is adopted in DPDK now[1], use GCC's atomic
builtins in test cases.
as previously discussed these atomics are not "C11" they are direct use of gcc
builtins. please don't incorporate C11 into the title of the patches or commit
messages since it isn't.
GCC supports 2 types of built-in atomics, __atomic_xxx[1] and __sync_xxx [2]. We need a way to distinguish between them. We are using "C11" as [1] says they match C++11 memory model.

[1] https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
[2] https://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html
please do not integrate a patch that directly uses gcc builtins and extensions
please maintain abstractions under the rte_ namespace.
This is just another wrapper which is not required according to the current requirements we are working with.
specifically this patch substantially increases coupling to a single compiler
implementation reducing portability.

as previously requested, please establish at a minimum macros in the rte_
namespace for this.
This needs to be discussed at the Techboard. I have CCed the Techboard. The Techboard meets once in 2 weeks. The details are at [3]. Next meeting is on 6/30 at 10am CST. Can you please attend and make your case?

Alternately, you can send an email to techboard@dpdk.org explaining your case and we will debate and make a decision.

[3] https://core.dpdk.org/techboard/
thanks.
quoted
[1]
https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory-
model/
quoted
v2:
 Use rte_wait_until_equal() instead of original sync loops.
 <David Marchand>

v1:
 The initial version.

Joyce Kong (8):
  test/ticketlock: use GCC atomic builtins for lcores sync
  test/spinlock: use GCC atomic builtins for lcores sync
  test/rwlock: use GCC atomic builtins for lcores sync
  test/mcslock: use GCC atomic builtins for lcores sync
  test/mempool: remove unused variable for lcores sync
  test/mempool_perf: use GCC atomic builtins for lcores sync
  test/service_cores: use GCC atomic builtins for lock sync
  test/rcu: use GCC atomic builtins for data sync

 app/test/test_mcslock.c       | 14 +++--
 app/test/test_mempool.c       |  5 --
 app/test/test_mempool_perf.c  | 11 ++--
app/test/test_rcu_qsbr_perf.c | 98 +++++++++++++++++------------------
 app/test/test_rwlock.c        | 10 ++--
 app/test/test_service_cores.c | 36 +++++++------
 app/test/test_spinlock.c      |  9 ++--
 app/test/test_ticketlock.c    | 10 ++--
 8 files changed, 91 insertions(+), 102 deletions(-)

--
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help