Thread (21 messages) 21 messages, 4 authors, 2021-09-29

Re: [PATCH V2 1/5] xfsprogs: introduce liburcu support

From: Eric Sandeen <hidden>
Date: 2021-09-29 20:46:46

On 9/24/21 9:09 AM, Chandan Babu R wrote:
From: Dave Chinner <redacted>

The upcoming buffer cache rework/kerenl sync-up requires atomic
variables. I could use C++11 atomics build into GCC, but they are a
pain to work with and shoe-horn into the kernel atomic variable API.

Much easier is to introduce a dependency on liburcu - the userspace
RCU library. This provides atomic variables that very closely match
the kernel atomic variable API, and it provides a very similar
memory model and memory barrier support to the kernel. And we get
RCU support that has an identical interface to the kernel and works
the same way.

Hence kernel code written with RCU algorithms and atomic variables
will just slot straight into the userspace xfsprogs code without us
having to think about whether the lockless algorithms will work in
userspace or not. This reduces glue and hoop jumping, and gets us
a step closer to having the entire userspace libxfs code MT safe.

Signed-off-by: Dave Chinner <redacted>
[chandan.babu@oracle.com: Add m4 macros to detect availability of liburcu]
Signed-off-by: Chandan Babu R <redacted>
I've added Dave's m4 macros in place of yours, and with that circuitous
route I think we have a good set of changes, so:

Reviewed-by: Eric Sandeen <redacted>

for the combined set of this-plus-dave's-m4's (elsewhere in replies
on this thread)

Thanks,
-Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help