[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4be131ff-8fb3-40e2-8059-e2a7519e78b6@efficios.com>
Date: Fri, 20 Dec 2024 13:45:16 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: linux-kernel@...r.kernel.org, lttng-dev@...ts.lttng.org
Cc: Ondřej Surý <ondrej@....org>,
paulmck <paulmck@...nel.org>, Alan Stern <stern@...land.harvard.edu>,
Lai Jiangshan <jiangshanlai@...il.com>, Olivier Dion <odion@...icios.com>,
Brad Smith <brad@...style.com>, lwn@....net
Subject: Re: [RELEASE] Userspace RCU 0.15.0
On 2024-12-20 12:25, Mathieu Desnoyers via lttng-dev wrote:
> Hi,
>
> This is a release announcement for the Userspace RCU library version
> 0.15.0. It has been nearly two years since the 0.14.0 release, so
> it is now time to get this out of the door.
As per our stable branch release cycle, the 0.13.4 release was the
last of the 0.13 branch, which reaches end of life with the release
of Userspace RCU 0.15.0.
Thanks,
Mathieu
>
> The Userspace RCU library implements RCU, atomics, and lock-free
> data structures in userspace.
>
> * New in this release:
>
> * Support for compiler builtins and ThreadSanitizer
>
> The main change that was introduced in this release is the
> introduction of the support for the C11 memory model based on the
> compiler atomic builtins, and adaptation of all algorithms within
> liburcu and liburcu-cds to express them in terms of atomics with
> release-acquire semantics, thus allowing ThreadSanitizer to understand
> the ordering guarantees provided by liburcu.
>
> Using ThreadSanitizer requires using the the compiler atomic builtins,
> which needs to be enabled explicitly when building liburcu with the
> following configure feature:
>
> --enable-compiler-atomic-builtins
>
> This is disabled by default. The default is to keep using the inline
> assembler implementation for the uatomic API.
>
> This work was sponsored by ISC. It came up as a requirement because
> BIND9 [1] now depends on liburcu, and use ThreadSanitizer in their
> testing.
>
> * Introduction of the CMM memory model with the following new
> primitives:
> - uatomic_load(addr, memory_order)
> - uatomic_store(addr, value, memory_order)
> - uatomic_and_mo(addr, mask, memory_order)
> - uatomic_or_mo(addr, mask, memory_order)
> - uatomic_add_mo(addr, value, memory_order)
> - uatomic_sub_mo(addr, value, memory_order)
> - uatomic_inc_mo(addr, memory_order)
> - uatomic_dec_mo(addr, memory_order)
> - uatomic_add_return_mo(addr, value, memory_order)
> - uatomic_sub_return_mo(addr, value, memory_order)
> - uatomic_xchg_mo(addr, value, memory_order)
> - uatomic_cmpxchg_mo(addr, old, new,
> memory_order_success,
> memory_order_failure)
>
> The uatomic API was extended to support explicit memory ordering.
> For instance, the previous uatomic_cmpxchg() now has a
> uatomic_cmpxchg_mo() counterpart, which takes a memory ordering
> argument.
>
> * Introduction of --disable-legacy-mb configure feature
>
> Some public APIs stipulate implicit memory barriers on operations. These
> were coherent with the memory model used at that time. However, with the
> migration to a memory model closer to the C11 memory model, these memory
> barriers are not strictly emitted by the atomic operations in the new
> memory model.
>
> Therefore, introduce the `--disable-legacy-mb' configuration
> option. By default, liburcu is configured to emit these legacy memory
> barriers, thus keeping backward compatibility at the expense of slower
> performances. However, users can opt-out by disabling the legacy memory
> barriers.
>
> * Introduction of CCM annotation experimental API
>
> The CMM annotation is highly experimental and not meant to be used by
> user for now, even though it is exposed in the public API since some
> parts of the liburcu public API require those annotations for
> ThreadSanitizer support.
>
> The main primitive is the cmm_annotate_t which denotes a group of memory
> operations associated with a memory barrier. A group follows a state
> machine, starting from the `CMM_ANNOTATE_VOID' state. The following are
> the only valid transitions:
>
> CMM_ANNOTATE_VOID -> CMM_ANNOTATE_MB (acquire & release MB)
> CMM_ANNOTATE_VOID -> CMM_ANNOTATE_LOAD (acquire memory)
> CMM_ANNOTATE_LOAD -> CMM_ANNOTATE_MB (acquire MB)
>
> The macro `cmm_annotate_define(name)' can be used to create an
> annotation object on the stack. The rest of the `cmm_annotate_*' macros
> can be used to change the state of the group after validating that the
> transition is allowed. Some of these macros also inject TSAN annotations
> to help it understand the flow of events in the program since it does
> not currently support thread fence.
>
> * Introduction of cmm_ptr_eq()
>
> When users define `URCU_DEREFERENCE_USE_VOLATILE', `rcu_dereference()'
> is implemented using `CMM_ACCESS_ONCE()', even when compiled with atomic
> builtins or if the compiler support the C11 memory model.
>
> This allows optimization on weakly-ordered architectures where the
> `CMM_CONSUME' memory order is implemented as `CMM_ACQUIRE'.
>
> To prevent the compiler from doing certain optimizations on pointers
> equivalence, introduce the `cmm_ptr_eq()' API for pointer comparisons.
>
> * Deprecation of liburcu-signal
>
> Users can migrate to liburcu-memb with a kernel implementing the
> membarrier(2) system call to have similar read-side performance without
> requiring use of a reserved signal, and with improved grace period
> performance.
>
> * OpenBSD Support
>
> OpenBSD support was contributed by Brad Smith from Comstyle.
>
> * Loongarch Support
>
> Loongarch support was contributed by Wang Jing from Loongson.
>
> * RISCV Compiler Support
>
> Build on RISCV is allowed on clang and gcc >= 13.3, which unlike
> older gcc are should have a working atomics implementation.
>
> * The GCC baseline is moved to 4.8.
>
> Because anyone using a gcc older than 4.8 should really think
> about upgrading now.
>
> * Move to the SPDX identifiers
>
> We introduce the SPDX identifiers in the project to simplify
> tracing licenses.
>
> Thanks,
>
> Mathieu
>
> Project website: https://liburcu.org
> Git repository: git://git.liburcu.org/urcu.git
>
> [1] https://www.isc.org/bind/
>
> * Detailed Changelog:
>
> 2024-12-20 Userspace RCU 0.15.0
> * Fix compilation errors
> * Document cmm_cast_volatile
> * Honor URCU_DEREFERENCE_USE_VOLATILE
> * arm: Use atomic builtins for xchg if supported
> * Introduce _CMM_TOOLCHAIN_SUPPORT_C11_MM
> * Seperate uatomic and uatomic_mo
> * uatomic: Fix header guard comment
> * Fix: missing typename in URCU_FORCE_CAST
> * Allow building with GCC >= 13.3 on RISC-V
> * pointer.h: Fix the rcu_cmpxchg_pointer documentation
> * rculfhash: make cds_lfht_iter_get_node argument const
> * lfstack: make cds_lfs_empty argument const
> * wfcqueue: make cds_wfcq_empty arguments const
> * wfstack: make cds_wfs_empty argument const
> * cds_list: make cds_list_replace @old argument const
> * cds_list: make cds_list_empty const
> * Adjust shell script to allow Bash in other locations
> * futex.h: Indent preprocessor directives
> * futex.h: Use urcu_posix_assert to validate unused values
> * Use futex on OpenBSD
> * fix: handle EINTR correctly in get_cpu_mask_from_sysfs
> * Relicense src/compat-smp.h to MIT
> * uatomic/x86: Remove redundant memory barriers
> * cleanup: move rand_r compat code to tests
> * ppc: Document cache line size choice
> * Fix: change order of _cds_lfht_new_with_alloc parameters
> * Add support for custom memory allocators for rculfhash
> * ppc.h: use mftb on ppc
> * rcutorture: Check histogram of ages
> * docs: Add links to project resources
> * Fix: allow clang to build liburcu on RISC-V
> * Fix -Walloc-size
> * cleanup: use an enum for the error states of nr_cpus_mask
> * fix: add missing SPDX licensing tags
> * urcu/uatomic/riscv: Mark RISC-V as broken
> * Fix: urcu-bp: misaligned reader accesses
> * rculfhash: Only pass integral types to atomic builtins
> * LoongArch: Document that byte and short atomics are
> implemented with LL/SC
> * Add LoongArch support
> * Tests: Add test for byte/short atomics on addresses which are
> not word-aligned
> * Complete removal of urcu-signal flavor
> * doc/examples: Remove urcu-signal example
> * tests/common: Remove urcu-signal common test files
> * tests/benchmark: Remove urcu-signal benchmark tests
> * tests/regression: Remove urcu-signal regression tests
> * tests/unit: Remove urcu-signal unit tests
> * Fix: Add missing cmm_smp_mb() in deprecated urcu-signal
> * urcu/uatomic.h: Improve verbosity of static assert error
> messages
> * urcu/compiler: Add urcu_static_assert
> * Phase 1 of deprecating liburcu-signal
> * uatomic/generic: Fix redundant declaration warning
> * tests: Add tests for checking race conditions
> * Add cmm_emit_legacy_smp_mb()
> * urcu/annotate: Add CMM annotation
> * tests/unit/test_build: Quiet unused return value
> * benchmark: Use uatomic for accessing global states
> * tests: Use uatomic for accessing global states
> * urcu-wait: Fix wait state load/store
> * Add CMM memory model
> * urcu/arch/generic: Use atomic builtins if configured
> * urcu/compiler: Use atomic builtins if configured
> * configure: Add --enable-compiler-atomic-builtins option
> * Fix: tests/rcutorture: Put thread offline on busy-wait
> * tests/regression/rcutorture: Use urcu-wait
> * tests/rcutorture: Factor out thread registration
> * tests/regression/rcutorture: Add wait state
> * urcu-wait: Initialize node in URCU_WAIT_NODE_INIT
> * Complete REUSE support
> * extras/abi: license data files under CC-1.0
> * examples: use SPDX identifiers
> * tests: use SPDX identifiers
> * src: use SPDX identifiers
> * Public headers: use SPDX identifiers
> * Build system: use SPDX identifiers
> * Fix: urcu-wait: add missing futex.h include
> * doc: update GCC baseline to 4.8
> * doc: update FreeBSD tested version
> * doc: Remove Solaris from tested platforms
> * Revert "compiler.h: Introduce caa_unqual_scalar_typeof"
> * rculfhash: Use caa_container_of_check_null in cds_lfht_entry
> * compiler.h: Introduce caa_container_of_check_null
> * compiler.h: Introduce caa_unqual_scalar_typeof
> * Avoid calling caa_container_of on NULL pointer in cds_lfht
> macros
> * Fix: revise urcu_read_lock_update() comment
> * Fix: uatomic powerpc comment about lwsync
> * fix: aarch64: allow RHEL7 gcc 4.8.5-11
> * aarch64: Implement caa_cpu_relax as yield instruction
> * fix: warning 'noreturn' function does return on ppc
> * Fix: use __noreturn__ for C11-compatibility
> * Adjust shell scripts to allow Bash in other locations
> * Add support for OpenBSD
> * Bump version to 0.15.0-pre
>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Powered by blists - more mailing lists