From: Harry Yoo <harry@kernel.org>
To: Vitaly Wool <vitaly.wool@konsulko.se>
Cc: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
akpm@linux-foundation.org, cl@gentwo.org, hao.li@linux.dev,
hch@lst.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org,
nickolai@csail.mit.edu, rientjes@google.com,
roman.gushchin@linux.dev, vitaly.vul@partner.samsung.com
Subject: Re: [PATCH v1] mempool: fix min_nr exceeding the elements array after concurrent resizes
Date: Tue, 20 Oct 2026 11:57:38 +0100 [thread overview]
Message-ID: <atdIhmwwhQxL3eG0@thinkstation> (raw)
In-Reply-To: <2F07BE53-D6E5-4988-B1BD-84AD2A05DDA2@konsulko.se>
On Tue, Oct 20, 2026 at 12:50:38PM +0200, Vitaly Wool wrote:
>
>
> > On Oct 20, 2026, at 10:27 AM, Vlastimil Babka (SUSE) <vbabka@kernel.org> wrote:
> >
> > On 10/19/26 08:45, Vitaly Wool wrote:
> >>
> >>
> >>> On Oct 18, 2026, at 6:15 PM, Harry Yoo <harry@kernel.org> wrote:
> >>>
> >>> On Sun, Oct 18, 2026 at 06:03:15PM +0200, Vitaly Wool wrote:
> >>>>>> How about we take my patch [1] instead since
> >>>>>> it isn't prone to this bug and is a nice optimization to the existing
> >>>>>> mempool_resize() at the same time?
> >>>>>
> >>>>> It is not a good idea to squeeze a bug fix and an optimization
> >>>>> into one patch.
> >>>>
> >>>> Generally speaking, yes. But that patch had been submitted before the fix
> >>>> popped up, so there was no sqeezing per se.
> >>>
> >>> I mean the patch you've submitted does two things (wihch is not good).
> >>>
> >>> It should be split into two patches that 1) fixes the bug and 2)
> >>> optimizes it.
> >>
> >> I don’t think this is a fair statement. I would say that the patch I’ve
> >> submitted improves mempool_resize() to be rid of unnecessary
> >> reallocations and data copying, and that (improved) implementation is
> >> *not* prone to the race found in the previous version of this function.
> >
> > But it makes the code more complex:
> >
> > 2 files changed, 28 insertions(+), 16 deletions(-)
> >
> > without an in-tree use case.
>
> It does help bulk-zoned, e. g. on a device-mapper table change that grows the
> pool.
Please provide data, rather than a theory without data.
--
Cheers,
Harry / Hyeonggon
next prev parent reply other threads:[~2026-10-20 10:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 13:25 Nickolai Zeldovich
2026-10-16 15:46 ` Harry Yoo
2026-10-16 16:33 ` Nickolai Zeldovich
2026-10-18 15:01 ` Vitaly Wool
2026-10-18 15:15 ` Harry Yoo
2026-10-18 16:03 ` Vitaly Wool
2026-10-18 16:15 ` Harry Yoo
2026-10-19 6:45 ` Vitaly Wool
2026-10-19 13:27 ` Harry Yoo
2026-10-20 8:27 ` Vlastimil Babka (SUSE)
2026-10-20 10:50 ` Vitaly Wool
2026-10-20 10:57 ` Harry Yoo [this message]
2026-10-20 8:42 ` Vlastimil Babka (SUSE)
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=atdIhmwwhQxL3eG0@thinkstation \
--to=harry@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=hao.li@linux.dev \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nickolai@csail.mit.edu \
--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
all inboxes | Powered by JetHome®