Re: [GIT PULL] RCU regression fix for v6.4
From: Paul E. McKenney
Date: Fri Jun 16 2023 - 17:27:04 EST
On Fri, Jun 16, 2023 at 11:50:31AM -0700, Linus Torvalds wrote:
> 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?
Good point, thank you! I will add the lock to Tiny SRCU, shooting for
the v6.6 merge window.
Thanx, Paul