Re: [PATCH RFC v2 06/20] slab: make percpu sheaves compatible with kmalloc_nolock()/kfree_nolock()
From: Sebastian Andrzej Siewior
Date: Tue Jan 13 2026 - 13:36:07 EST
On 2026-01-12 16:17:00 [+0100], Vlastimil Babka wrote:
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -5727,6 +5742,12 @@ void *kmalloc_nolock_noprof(size_t size, gfp_t gfp_flags, int node)
> */
> return NULL;
>
> + ret = alloc_from_pcs(s, alloc_gfp, node);
> + if (ret)
> + goto success;
I'm sorry if I am slow but this actually should actually allow
kmalloc_nolock() allocations on PREEMPT_RT from atomic context. I am
mentioning this because of the patch which removes the nmi+hardirq
condtion (https://lore.kernel.org/all/20260113150639.48407-1-swarajgaikwad1925@xxxxxxxxx)
> +
> + ret = ERR_PTR(-EBUSY);
> +
> /*
> * Do not call slab_alloc_node(), since trylock mode isn't
> * compatible with slab_pre_alloc_hook/should_failslab and
Sebastian