From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Harry Yoo <harry@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Hao Li <hao.li@linux.dev>, Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Jesper Dangaard Brouer <hawk@kernel.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, io-uring@vger.kernel.org,
kasan-dev@googlegroups.com, bpf@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: improve the kmem_cache_alloc_bulk API
Date: Thu, 28 May 2026 11:16:07 +0200 [thread overview]
Message-ID: <bc7e1123-35bd-4bc2-a6e5-39f76d9722b0@kernel.org> (raw)
In-Reply-To: <20260528090508.GB8376@lst.de>
On 5/28/26 11:05, Christoph Hellwig wrote:
> On Wed, May 27, 2026 at 04:07:12PM +0200, Vlastimil Babka (SUSE) wrote:
>> commit 46dea1744498 ("slab: refill sheaves from all nodes") from this January.
>> Previously it was just interrupts enabled.
>>
>> > but by requiring separate functions so I somehow doubt that was meant.
>>
>> Yeah, it's expressed by the _nolock variants. But slab propagates it internally
>> by the gfp flags, and since 46dea1744498 it affects kmem_cache_alloc_bulk().
>
> So what are the GFP flags that affect spinning? I can't find anything
> related to that in either Documentation/core-api/memory-allocation.rst or
> include/linux/gfp_types.h.
See gfpflags_allow_spinning(). The usage by slab and page allocator users
was meant to be via _nolock() variants, not by removing the flags when
calling the normal functions, hence it's not documented. But the abstraction
has now leaked in the kmem_cache_alloc_bulk() case, hm. I think instead of
documenting that, we should adjust the implementation in slab, if possible.
I'll try to look into that.
prev parent reply other threads:[~2026-05-28 9:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 7:02 improve the kmem_cache_alloc_bulk API Christoph Hellwig
2026-05-27 7:02 ` [PATCH] mm/slab: improve kmem_cache_alloc_bulk Christoph Hellwig
2026-05-27 7:53 ` bot+bpf-ci
2026-05-27 8:51 ` Jesper Dangaard Brouer
2026-05-27 13:56 ` Alexander Lobakin
2026-05-27 14:07 ` Christoph Hellwig
2026-05-27 9:38 ` Vlastimil Babka (SUSE)
2026-05-27 12:20 ` Christoph Hellwig
2026-05-28 8:58 ` kernel test robot
2026-05-27 9:11 ` improve the kmem_cache_alloc_bulk API Vlastimil Babka (SUSE)
2026-05-27 12:21 ` Christoph Hellwig
2026-05-27 14:07 ` Vlastimil Babka (SUSE)
2026-05-28 9:05 ` Christoph Hellwig
2026-05-28 9:16 ` Vlastimil Babka (SUSE) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc7e1123-35bd-4bc2-a6e5-39f76d9722b0@kernel.org \
--to=vbabka@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bpf@vger.kernel.org \
--cc=cl@gentwo.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=hawk@kernel.org \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox