Re: [GIT PULL] RCU regression fix for v6.4
From: Linus Torvalds
Date: Fri Jun 16 2023 - 14:50:57 EST
On Fri, 16 Jun 2023 at 09:34, Paul E. McKenney <paulmck@xxxxxxxxxx> wrote:
>
> Yes, it would be nice to abstract this somehow in order to hide it in
> SRCU, but I still don't see a good way of doing this.
Ehh - like we actually do spinlocks in general, perhaps?
Spinlocks always exist. On UP - with no spinlock debugging - it turns
into a zero-sized data structure, and the spin lock/unlock operations
are no-ops.
Why don't you just do the exact same thing with the "struct
srcu_usage". For Tiny SRCU, just make it an empty struct, with an
empty initializer.
IOW, don't "abstract it out". Abstract it IN. Make tiny-rcu still have
it, just as a no-op.
Anyway, I've pulled your fix, but maybe the above would have been the
cleaner solution?
Linus