On 9/24/21 9:09 AM, Chandan Babu R wrote:
From: Dave Chinner <dchinner@xxxxxxxxxx> 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 <dchinner@xxxxxxxxxx> [chandan.babu@xxxxxxxxxx: Add m4 macros to detect availability of liburcu] Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>
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 <sandeen@xxxxxxxxxx> for the combined set of this-plus-dave's-m4's (elsewhere in replies on this thread) Thanks, -Eric