Re: [PATCH] mm: mempolicy: fix automatic numa balancing for shmem

From: Andrew Morton

Date: Thu Jul 23 2026 - 20:15:35 EST


On Thu, 23 Jul 2026 10:54:06 -0400 Johannes Weiner <hannes@xxxxxxxxxxx> wrote:

> > But in this case, IIUC, this change will "silently" enable NUMA balancing for
> > shmem-based KVM setups where it was previously disabled (albeit unintentionally).
> >
> > I'm not fundamentally opposed to the change, but I do worry that downstream KVM
> > users could be in for a nasty surprise.

It is a bit concerning.

> This should be very visible in early kernel validation after an
> upgrade. VM hosts tend to not do much else, with VM memory dominating
> the host. You'd expect a significant uptick in numa_pte_updates,
> numa_hint_faults, and a change in per-node nr_shmem stats. And the
> patch subject makes it trivial to find in a commit delta scan.

Is there anything we can do to make this process less painful?
Documentation of course, but what about detecting the situation and
emitting a once-off warning?