[ltt-dev] [PATCH 00/11] Simplify system dependent URCU code
Mathieu Desnoyers
compudj at krystal.dyndns.org
Sun Feb 14 09:25:08 EST 2010
* Paolo Bonzini (pbonzini at redhat.com) wrote:
> This patch series simplifies the system dependent code in the
> userspace RCU library by removing redundant definitions and
> moving them to common code. The common code is then less
> subject to bitrotting because it can be tested on x86 too.
Hi Paolo,
I like the patchset in general. I have a few comments though. Once
addressed, please re-send the whole patchset, as there may be
dependencies between the individual patches.
I'll reply to the individual patches with comments.
Mathieu
>
>
> Patches 3 and 4 take care of urcu/arch_*. Definitions for
> rmb/wmb/mc/rmc/wmc can often be omitted, and even mb can
> for example defer to the compiler-provided __sync_synchronize.
>
> Patch 5 removes a redundant definition that is probably
> a residual of libatomicops, and so does patch 6.
>
> Patches 7 to 9 take care of urcu/uatomic_arch_*, by defining
> fallbacks using __sync_* builtins. S390 can use them completely
> without basically changing the generated code, while other
> architectures still require a little help.
>
> Patches 10 and 11 show how this helps by supporting
> compilation to unknown architectures that support GCC
> builtins (MIPS and IA64 are serviced nicely for example),
> and by supporting Alpha (obviously chosen as an example of
> read_barrier_depends) with ~20 lines of non-comment code.
>
> Patch 12 is not meant to be committed, but was used to test
> the atomic op implementations on x86_64. It is not counted
> in the diffstat below.
>
> HTH,
>
> Paolo
>
> Paolo Bonzini (11+1):
> use kernel style makefile output
> use autoconf symbolic linking
> add urcu/arch_defaults.h
> define sync_core for x86 PIC
> __SIZEOF_LONG__ is always defined by GCC
> remove compat_uatomic_cmpxchg #define from non-x86
> add uatomic_gcc.h, use it for default definitions
> use uatomic_gcc.h
> move whether atomic byte/short exists to uatomic_arch_*.h
> add Alpha support
> support compiling on unknown architectures
> test uatomic_gcc.h
>
> Makefile.am | 14 +-
> configure.ac | 15 ++-
> tests/test_uatomic.c | 15 +-
> urcu/arch_alpha.h | 49 +++++
> urcu/arch_defaults.h | 109 ++++++++++
> urcu/arch_ppc.h | 50 +-----
> urcu/arch_s390.h | 46 +----
> urcu/arch_sparc64.h | 51 +-----
> urcu/arch_x86.h | 68 +------
> urcu/uatomic_arch_alpha.h | 32 +++
> urcu/uatomic_arch_ppc.h | 143 +-------------
> urcu/uatomic_arch_s390.h | 193 +------------------
> urcu/uatomic_arch_sparc64.h | 109 +----------
> urcu/uatomic_arch_x86.h | 37 ++----
> urcu/uatomic_gcc.h | 293 +++++++++++++++++++++++++++++++++++++++++++
> 15 files changed, 538 insertions(+), 686 deletions(-)
> create mode 100644 urcu/arch_alpha.h
> create mode 100644 urcu/arch_defaults.h
> create mode 100644 urcu/uatomic_arch_alpha.h
> create mode 100644 urcu/uatomic_gcc.h
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
More information about the lttng-dev
mailing list