Re: [PATCH] mm: mempolicy: fix automatic numa balancing for shmem
From: Gregory Price
Date: Thu Jul 23 2026 - 18:57:18 EST
On Thu, Jul 23, 2026 at 03:30:52PM -0700, Yosry Ahmed wrote:
> On Thu, Jul 23, 2026 at 11:45 AM Gregory Price <gourry@xxxxxxxxxx> wrote:
> >
> > Walking this all back:
> >
> > - MPOL_DEFAULT is the default policy
> > - numa_balancing=on means enable NUMA_BALANCING on the defaul policy
> > - shmem was broken and did not respect this
> >
> > Johannes' fix is correct, and there are no additional changes required.
> >
> > Users enabling numa balancing while running KVM with shared regions are
> > not getting what they're asking for presently - that is a bug.
> >
> > They should get the performance hit they're asking for (and then either
> > turn off numa balancing or set an explicit mempolicy for those tasks /
> > memfd's).
>
> Does it make sense to add a pr_warn() or pr_info() to help users
> figure this out when they see a regression?
I'm not sure in what scenario we would do this that doesn't simple
reduce to "You turned numa balancing on".
Not against it.
~Gregory