Re: [PATCH v3] mm/slab: don't use kfree_rcu sheaves on PREEMPT_RT in kvfree_call_rcu()

From: ThangNN99

Date: Mon Aug 31 2026 - 16:42:26 EST


Thanks, both are pre-existing and out of scope for this patch:

- The GFP_NOWAIT/wakeup_kswapd() concern in __kfree_rcu_sheaf() applies
identically before and after this patch on !PREEMPT_RT; this patch
only changes the PREEMPT_RT branch. It also predates the commit this
patch fixes: alloc_empty_sheaf() has used GFP_NOWAIT in this call
chain since the sheaves feature was introduced in ec66e0d59952
("slab: add sheaf support for batching kfree_rcu() operations"), not
since 2a8bb29ec9b2. It's a real question about the sheaf/barn
allocation design itself, not something a small, targeted fix for
the syzbot-reported splat should also try to redesign.

- Same as noted for the previous review: kfree_call_rcu_nolock() is
intentionally left untouched by this patch. Agreed it doesn't fully
deliver on its 'any context' contract on PREEMPT_RT either, for the
reasons given (local_trylock ordering, and now also alloc_empty_sheaf()
reaching zone->lock). That's a separate fix.

Both would be good candidates for their own patches from whoever
knows the sheaf/barn allocation path best; happy to help test if one
gets posted. This patch stays scoped to the specific circular-locking
splat in kvfree_call_rcu() reported by syzbot.

Thanks,
ThangNN99