On 6/15/26 13:06, Harry Yoo (Oracle) wrote: > Currently, k[v]free_rcu() cannot be called in unknown context since > it could lead to a deadlock when called in the middle of k[v]free_rcu(). > > Make users' lives easier by introducing kfree_rcu_nolock() variant, > now that kfree_rcu_sheaf() is available on PREEMPT_RT and > __kfree_rcu_sheaf() handles unknown context. > > Unlike k[v]free_rcu(), kfree_rcu_nolock() does not fall back to > the kvfree_rcu batching when the sheaves path fails, and falls back to > defer_kfree_rcu() instead. In most cases, the sheaves path is expected > to succeed and it's unnecessary to add complexity to the existing > kvfree_rcu batching. > > Since defer_kfree_rcu() can be called on caches without sheaves, move > deferred_work_barrier() and rcu_barrier() outside the branch in > kvfree_rcu_barrier_on_cache(). > > Signed-off-by: Harry Yoo (Oracle) <[email protected]>
LGTM, nice. Reviewed-by: Vlastimil Babka (SUSE) <[email protected]>

