Re: [PATCH v1] mempool: fix min_nr exceeding the elements array after concurrent resizes
From: Harry Yoo
Date: Sun Oct 18 2026 - 12:15:38 EST
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.
(Setting aside the question of whether the optimization is worth the
complexity)
--
Cheers,
Harry / Hyeonggon