Skip to content

mempool: optimize mempool resizing#1009

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1116713=>linus-master
Open

mempool: optimize mempool resizing#1009
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1116713=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

Pull request for series with
subject: mempool: optimize mempool resizing
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1116713

@blktests-ci

blktests-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Author

Upstream branch: bade58e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116713
version: 1

@blktests-ci

blktests-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 4edcdef
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116713
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1116713=>linus-master branch from 4cd873d to f1378d2 Compare June 26, 2026 08:22
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 4cc45a3 to 90ffd56 Compare June 29, 2026 17:14
Resizing mempool to a bigger size currently requires a new allocation and a
data copy to a new larger elements array which doesn't go well with the
idea of having a fast and deadlock free memory allocations during exreme VM
load.

This patch introduces a new parameter max_nr for a part of the mempool API,
which denotes the maximum size of the pool. With it in place we can avoid
any allocations in mempool_resize() since we can either grant the resizing
request or reject it basing on thr maximum allowed size of the elements
array. For those few users of the mempool API that actually use
mempool_resize() it is a clear upgrade because the maximum number of
elements is known upfront.

Derivative APIs (like mempool_init_kmalloc_pool()) are mostly left intact,
substituted by the new mempool_init_kmalloc_resizable_pool() API where the
pool is actually meant to be resizable.

Signed-off-by: Vitaly Vul <vitaly.vul@partner.samsung.com>
@blktests-ci

blktests-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown
Author

Upstream branch: dc59e4f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1116713
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1116713=>linus-master branch from f1378d2 to 17f581c Compare June 29, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants