From: Christoph Hellwig <hch@lst.de>
To: Vitaly Wool <vitaly.wool@konsulko.se>
Cc: Harry Yoo <harry@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Roman Gushchin <roman.gushchin@linux.dev>,
David Rientjes <rientjes@google.com>,
Christoph Lameter <cl@gentwo.org>, Hao Li <hao.li@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@kernel.org>,
Damien Le Moal <dlemoal@kernel.org>,
Christoph Hellwig <hch@lst.de>,
vitaly.vul@partner.samsung.com
Subject: Re: [PATCH] mempool: optimize mempool resizing
Date: Wed, 14 Oct 2026 15:03:01 +0200 [thread overview]
Message-ID: <20261014130301.GC15407@lst.de> (raw)
In-Reply-To: <20261014084528.1280968-1-vitaly.wool@konsulko.se>
On Wed, Oct 14, 2026 at 10:45:28AM +0200, Vitaly Wool wrote:
> We are using mempool to store a large set of preallocated rather big buffers. In case
> of memory pressure we'd call mempool_resize() (via shrinker callbacks) to reduce the
> amount of memory occupied by that set, and when the situation stabilizes, we'd go back
> to the original set again.
>
> Imagine you have a mempool with 10000 elements, and you have to reduce it to 3000. Then
> if you at some point want to go back to 10000, you'll end up reallocating the elements
Who is "we" and where is the code? This is a highly unusual, not to
say most like broken usage of mempools. If you need changes to support
such a use case you should include a link to the intree user (or bundle
it with the submission of the new code).
next prev parent reply other threads:[~2026-10-14 13:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 9:14 [PATCH v2] mempool: optimize mempool resizing Vitaly Wool
2026-10-13 11:49 ` Harry Yoo
2026-10-14 8:45 ` Re: [PATCH] " Vitaly Wool
2026-10-14 13:03 ` Christoph Hellwig [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-06-25 19:49 Vitaly Wool
2026-06-25 20:17 ` Andrew Morton
2026-06-29 23:37 ` Vitaly
2026-06-25 23:50 ` Damien Le Moal
2026-06-26 4:22 ` Christoph Hellwig
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=20261014130301.GC15407@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=dlemoal@kernel.org \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=vbabka@kernel.org \
--cc=vitaly.vul@partner.samsung.com \
--cc=vitaly.wool@konsulko.se \
/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