Re: [RFC PATCH 1/1] hpref: Hazard Pointers with Reference Counter

Mathieu Desnoyers <[email protected]> Tue, 6 Jan 2026 09:52:35 -0500
Newsgroups dev.linux.lists.lkmm
Message-ID <[email protected]>
On 2024-09-30 09:31, Jonas Oberhauser wrote:
> [dropping a lot of CC]
> 
> Am 9/21/2024 um 6:42 PM schrieb Mathieu Desnoyers:
>>
>> Porting it to the Linux kernel should be straightforward. 
> 
> 
> Btw, what is the relation between uatomics and LKMM?
> 
> Should I assume that they intend to have LKMM semantics modulo whatever 
> is explained here:
> 
> https://github.com/urcu/userspace-rcu/blob/master/doc/uatomic-api.md
> 
> Because on C11 model, dependencies are generally not considered

Sorry for the (very) late reply. :)

liburcu uatomics and "cmm_*" API initially aimed to replicate the LKMM
in userspace (note: this was done circa 2009). However, starting from
liburcu 0.15, we extended the uatomics API to support the C11 model,
with an additional "CMM_SEQ_CST_FENCE" which aims to fill the gap
between LKMM and C11.

Starting from liburcu 0.15, you can configure the library with:

--enable-compiler-atomic-builtins: Enable the use of compiler
                                    atomic builtins.

Without this configure flag, the legacy custom assembly atomics
are still used.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com