Thanks. Maxim could you first try to merge and resolve conflicts. Those should 
be quite simple to resolve: additional atomic validation tests into 
validation/atomic/atomic.c instead of old 
validation/synchronizers/synchronizers.c.


-Petri


From: EXT Ola Liljedahl [mailto:ola.liljed...@linaro.org]
Sent: Tuesday, January 26, 2016 2:16 PM
To: Savolainen, Petri (Nokia - FI/Espoo)
Cc: LNG ODP Mailman List
Subject: Re: [lng-odp] [API-NEXT PATCH v3 00/13] atomi api completion

On 20 January 2016 at 10:19, Petri Savolainen 
<petri.savolai...@nokia.com<mailto:petri.savolai...@nokia.com>> wrote:
Completed additions to atomic API. Added exchange operation in relaxed memory
model. Added CAS operations in rel and acq_rel memory order. Added 64 bit
versions of all non-relaxed operations defined so far. Added all missing
validation tests. Replaced internal atomics usage in lock, etc code
(all except spinlock and timer) with API calls.

This set of atomic calls seem to be sufficient to current linux-generic use
cases. Timer and spinlock use atomic flag and 128 bit types, but does not
require additional operation types (e.g. load_acq, store_rel, cas, cas_rel, etc
are supported by the API).

Additional operations can be added later if needed. Only commonly needed
combinations of non-relaxed operations will be supported (added based on use
case as any other ODP API). This set should already enable major part of
lock-free algorithms.
They enable a lot of *lock-less* implementations but not all lock-less designs 
are properly "lock-free". Lock-free implies that no thread can block other 
other threads from doing progress. E.g. the DPDK ring buffer we copied is 
lock-less (based on CAS) but not lock-free, a thread which has entered the 
critical section (between CAS and the subsequent releasing store) must exit it 
before other threads can exit the critical section. The lock-less design 
enables some parallelism in operating on the data structure.


v3:
  * Corrected race condition in xchg validation test

v2:
  * rebased on latest api-next
Failed to actually build and run validation tests since some patches require 
some manual effort to merge. We agreed Petri & Maxim would do that.
Whole patch set
Reviewed-by: Ola Liljedahl 
<ola.liljed...@linaro.org<mailto:ola.liljed...@linaro.org>>


Petri Savolainen (13):
  api: atomic: rename release ordering
  api: atomic: added 32bit cas_rel and cas_acq_rel
  linux-generic: atomic: 32bit cas_rel and cas_acq_rel
  api: atomic: add non-relaxed 64bit operations
  linux-generic: atomic: non-relaxed 64bit operations
  api: atomic: added relaxed exchange operation
  linux-generic: atomic: implemented exchange
  validation: atomic: added max and min tests
  validation: atomic: added cas test
  validation: atomic: added xchg test
  validation: atomic: added non-relaxed test
  linux-generic: locks: replace internal atomics
  linux-generic: barrier: use API memory barrier

 include/odp/api/atomic.h                           | 220 +++++++++++--
 platform/linux-generic/include/odp/atomic.h        | 142 ++++++++-
 .../linux-generic/include/odp_atomic_internal.h    |   6 -
 platform/linux-generic/include/odp_pool_internal.h |   1 -
 platform/linux-generic/odp_barrier.c               |   8 +-
 platform/linux-generic/odp_pool.c                  |   1 -
 platform/linux-generic/odp_rwlock.c                |  23 +-
 platform/linux-generic/odp_ticketlock.c            |  21 +-
 test/validation/synchronizers/synchronizers.c      | 347 ++++++++++++++++++++-
 test/validation/synchronizers/synchronizers.h      |   4 +
 10 files changed, 689 insertions(+), 84 deletions(-)

--
2.6.3

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org<mailto:lng-odp@lists.linaro.org>
https://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to