Re: [PATCH 05/22] mm/mempolicy: keep interleave and tmpfs mount policies on common memory

From: Gregory Price (Meta)

Date: Wed Nov 18 2026 - 10:56:22 EST


On 2026-11-18 23:30 +0800, Richard Cheng wrote:
> On Sat, Nov 14, 2026 at 02:09:42AM +0800, Gregory Price (Meta) wrote:
> > - for_each_online_node(nid) {
> > - if (!node_state(nid, N_MEMORY))
> > - continue;
> > -
> > + for_each_node_state(nid, N_MEMORY_COMMON) {
>
> Maybe I overlooked or somehow, but when do we have the assumption
> that common memory is definitely onlined ?
>

For this particular case it's not particularly relevant.

This code only runs at init time, so it's either got memory or it
doesn't. If the memory is present but offline, it still wants weights.

There isn't really a bug here, but the existing code could also just
check N_MEMORY and end up with the same result. If the memory is
hotplugged later, it still gets weights accordingly.

--
~Gregory