Re: [PATCH] mm: mempolicy: fix automatic numa balancing for shmem
From: Gregory Price
Date: Thu Jul 23 2026 - 12:07:24 EST
On Thu, Jul 23, 2026 at 10:54:06AM -0400, Johannes Weiner wrote:
> >
> > My stance is that using NUMA balancing with KVM guests is a terrible idea, and
> > that anyone that insists on using such a setup gets to suffer the consequences.
>
> I agree. Surely we cannot leave shmem balancing broken due to
> that. It's also not clear to me how many people even enable numa
> balancing.
>
I lean towards Johannes' stance here that consistency is better, and if
KVM has a known-poor interaction with numa balancing, maybe KVM should
simply set a default policy (when none are present) to avoid this.
That said, this is painful because MPOL_F_MOF / MPOL_F_MORON are already
a silently inherited policy on boot (added during init). This will be
confusing for users.
This is not documented anywhere. Maybe this change should come with a
docs addition that says the default global policy is ACTUALLY:
MPOL_LOCAL + (MPOL_F_MOF | MPOL_F_MORON)
Instead of just MPOL_LOCAL and letting that silent implementation
detail bite people.
~Gregory