Re: [PATCH RFC v2 06/20] slab: make percpu sheaves compatible with kmalloc_nolock()/kfree_nolock()

From: Sebastian Andrzej Siewior

Date: Wed Jan 14 2026 - 10:07:50 EST


On 2026-01-14 15:05:34 [+0100], Vlastimil Babka wrote:
> > Yes IIRC Hao Li pointed that out before. We'll be able to remove that
> > !preemptible() check that we area about to add by the patch above.
> >
> > But I'm not sure we can remove (or "not put back") the "in_nmi() ||
> > in_hardirq()" too, because as you said it was added with different reasoning
> > initially?
>
> Ah right, it was "copied" from alloc_frozen_pages_nolock_noprof() where it's
> explained more, and AFAICS will be still applicable with sheaves. We should
> add a comment to kmalloc_nolock() referring to the
> alloc_frozen_pages_nolock_noprof() comment...

Right. This looks halfway what I remember. And this was works in atomic
context on RT because of rmqueue_pcplist()/ pcp_spin_trylock() usage.

Sebastian