mbox series

[v1,0/8] use GCC's C11 atomic builtins for test

Message ID 20210604094624.31308-1-joyce.kong@arm.com (mailing list archive)
Headers
Series use GCC's C11 atomic builtins for test |

Message

Joyce Kong June 4, 2021, 9:46 a.m. UTC
  Since C11 memory model is adopted in DPDK now[1], use GCC's 
atomic builtins in test cases.

[1]https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory-model/

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_perf: use GCC atomic builtins for data sync

 app/test/test_mcslock.c       | 13 +++--
 app/test/test_mempool.c       |  5 --
 app/test/test_mempool_perf.c  | 12 ++---
 app/test/test_rcu_qsbr_perf.c | 98 +++++++++++++++++------------------
 app/test/test_rwlock.c        |  9 ++--
 app/test/test_service_cores.c | 36 +++++++------
 app/test/test_spinlock.c      | 10 ++--
 app/test/test_ticketlock.c    |  9 ++--
 8 files changed, 93 insertions(+), 99 deletions(-)
  

Comments

Stephen Hemminger June 4, 2021, 7:57 p.m. UTC | #1
On Fri,  4 Jun 2021 04:46:16 -0500
Joyce Kong <joyce.kong@arm.com> wrote:

> Since C11 memory model is adopted in DPDK now[1], use GCC's 
> atomic builtins in test cases.
> 
> [1]https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory-model/
> 
> 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_perf: use GCC atomic builtins for data sync
> 
>  app/test/test_mcslock.c       | 13 +++--
>  app/test/test_mempool.c       |  5 --
>  app/test/test_mempool_perf.c  | 12 ++---
>  app/test/test_rcu_qsbr_perf.c | 98 +++++++++++++++++------------------
>  app/test/test_rwlock.c        |  9 ++--
>  app/test/test_service_cores.c | 36 +++++++------
>  app/test/test_spinlock.c      | 10 ++--
>  app/test/test_ticketlock.c    |  9 ++--
>  8 files changed, 93 insertions(+), 99 deletions(-)
> 

Thanks, I did this for pflock tests during review cycle

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
David Marchand June 11, 2021, 8:40 a.m. UTC | #2
On Fri, Jun 4, 2021 at 11:46 AM Joyce Kong <joyce.kong@arm.com> wrote:
>
> Since C11 memory model is adopted in DPDK now[1], use GCC's
> atomic builtins in test cases.
>
> [1]https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory-model/
>
> 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_perf: use GCC atomic builtins for data sync

Just a nit, use rte_wait_until_equal() instead of those sync loops.
Rest lgtm, thanks.
  
Joyce Kong June 11, 2021, 10:45 a.m. UTC | #3
<snip>
> >
> > Since C11 memory model is adopted in DPDK now[1], use GCC's atomic
> > builtins in test cases.
> >
> > [1]https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory-
> mod
> > el/
> >
> > 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_perf: use GCC atomic builtins for data sync
> 
> Just a nit, use rte_wait_until_equal() instead of those sync loops.
> Rest lgtm, thanks.
> 

Thanks for your comment, I'll do the related changes.
> 
> --
> David Marchand