On Sun, May 03, 2020 at 08:27:00PM -0400, Joel Fernandes wrote: > On Fri, May 01, 2020 at 04:06:38PM -0700, Paul E. McKenney wrote: > > On Tue, Apr 28, 2020 at 10:59:01PM +0200, Uladzislau Rezki (Sony) wrote: > > > Make a kvfree_call_rcu() function to support head-less > > > freeing. Same as for tree-RCU, for such purpose we store > > > pointers in array. SLAB and vmalloc ptrs. are mixed and > > > coexist together. > > > > > > Under high memory pressure it can be that maintaining of > > > arrays becomes impossible. Objects with an rcu_head are > > > released via call_rcu(). When it comes to the head-less > > > variant, the kvfree() call is directly inlined, i.e. we > > > do the same as for tree-RCU: > > > a) wait until a grace period has elapsed; > > > b) direct inlining of the kvfree() call. > > > > > > Thus the current context has to follow might_sleep() > > > annotation. Also please note that for tiny-RCU any > > > call of synchronize_rcu() is actually a quiescent > > > state, therefore (a) does nothing. > > > > Please, please, please just do synchronize_rcu() followed by kvfree() > > for single-argument kfree_rcu() and friends in Tiny RCU. > > > > Way simpler and probably way faster as well. And given that Tiny RCU > > runs only on uniprocessor systems, the complexity probably is buying > > you very little, if anything. > > Agreed. > Cool. Agree also :) -- Vlad Rezki