Re: [PATCH RFC] rcu/kfree: Do not request RCU when not needed

From: Uladzislau Rezki
Date: Fri Nov 04 2022 - 10:41:13 EST


> >>
> >> Or am I missing something here?
> >
> > Yeah I am with Paul on this, NAK on “blocking in kworker” instead of “checking for grace period + queuing either regular work or RCU work”. Note that blocking also adds a pointless and fully avoidable scheduler round trip.
>
> As a side note, it’s notable how nicely this work evolved over the years thanks to Vlad and all of y’all’s work. For instance, flooding pages with kfree pointers and grace period polling was not something even invented back when kfree_rcu was a simple wrapper. Now it soon will be actually freeing memory faster, by avoiding waiting on RCU when not needed! And of course this is all happening probably because we wanted RCU to be lazy in nocb is a nice side effect of that effort ;-)
>
Yep. We want sometimes everything to be lazy :)

--
Uladzislau Rezki