[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <596a5461-eb50-40e5-88ca-d5dbe1fc6a67@suse.cz>
Date: Wed, 14 Jan 2026 14:57:48 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Harry Yoo <harry.yoo@...cle.com>, Petr Tesarik <ptesarik@...e.com>,
Christoph Lameter <cl@...two.org>, David Rientjes <rientjes@...gle.com>,
Roman Gushchin <roman.gushchin@...ux.dev>, Hao Li <hao.li@...ux.dev>,
Andrew Morton <akpm@...ux-foundation.org>,
Uladzislau Rezki <urezki@...il.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Suren Baghdasaryan <surenb@...gle.com>, Alexei Starovoitov <ast@...nel.org>,
linux-mm <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
linux-rt-devel@...ts.linux.dev, bpf <bpf@...r.kernel.org>,
kasan-dev <kasan-dev@...glegroups.com>
Subject: Re: [PATCH RFC v2 06/20] slab: make percpu sheaves compatible with
kmalloc_nolock()/kfree_nolock()
On 1/14/26 00:26, Alexei Starovoitov wrote:
> On Tue, Jan 13, 2026 at 10:36 AM Sebastian Andrzej Siewior
> <bigeasy@...utronix.de> wrote:
>>
>> 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@gmail.com)
>
> Right. With sheaves kmalloc_nolock() on RT will be more reliable.
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?
Powered by blists - more mailing lists