[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48e45106-f76a-421d-8f9c-645469076ad4@suse.cz>
Date: Wed, 12 Nov 2025 13:22:01 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Christoph Hellwig <hch@....de>, Andrew Morton <akpm@...ux-foundation.org>
Cc: Christoph Lameter <cl@...two.org>, David Rientjes <rientjes@...gle.com>,
Roman Gushchin <roman.gushchin@...ux.dev>, Harry Yoo <harry.yoo@...cle.com>,
Eric Biggers <ebiggers@...nel.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: mempool_alloc_bulk and various mempool improvements
On 11/11/25 14:52, Christoph Hellwig wrote:
> Hi all,
>
> this series adds a bulk version of mempool_alloc that makes allocating
> multiple objects deadlock safe.
>
> The initial users is the blk-crypto-fallback code:
>
> https://lore.kernel.org/linux-block/20251031093517.1603379-1-hch@lst.de/
>
> with which v1 was posted, but I also have a few other users in mind.
How do we handle this then once it's settled?
> Changes since v1:
> - fix build for !CONFIG_FAULT_INJECTION
> - improve the kerneldoc comments further
> - refactor the code so that the mempool_alloc fastpath does not
> have to deal with arrays
> - don't support !__GFP_DIRECT_RECLAIM for bulk allocations
> - do poll allocations even if not all elements are available
> - s/elem/elems/
> - use a separate failure injection know for the bulk allocator
>
> diffstat:
> include/linux/fault-inject.h | 8 -
> include/linux/mempool.h | 7
> mm/mempool.c | 341 ++++++++++++++++++++++++++++---------------
> 3 files changed, 240 insertions(+), 116 deletions(-)
Powered by blists - more mailing lists