Re: [PATCH 1/2] mm/percpu: Preserve NOFS/NOIO scope during chunk create and populate

From: Pedro Falcato

Date: Tue Jun 02 2026 - 09:49:34 EST


On Sat, May 30, 2026 at 03:32:19PM +0200, Dennis Zhou wrote:
<snip>
> >
> > I’ll try to do it.
> >
> > Following your suggestion, including in [PATCH 2/2], I will also try a
> > different approach and fix the issue by reducing the scope of the
> > pcpu_alloc_mutex critical section.
> >
>
> No please don't. The point of the percpu mutex is to ensure that only
> one person is ever possibly creating a new chunk. If you drop the mutex,
> then you have to deal with concurrent callers when available percpu
> memory is low. Percpu memory is expensive and unmovable so the cost is
> in the control plane to avoid excess fragmentation.

And so is slab memory, yet this is not a problem. We shouldn't keep
problematic locks just because they may aid fragmentation slightly.


--
Pedro