Re: [PATCH v2] mm/memory_hotplug: maintain N_NORMAL_MEMORY during hotplug

From: Hao Li

Date: Tue Mar 31 2026 - 00:25:22 EST


On Mon, Mar 30, 2026 at 02:46:40PM -0700, Andrew Morton wrote:
> On Mon, 30 Mar 2026 17:34:21 +0800 Hao Li <hao.li@xxxxxxxxx> wrote:
>
> > > > Current users that benefit include list_lru, zswap, nfsd filecache,
> > > > hugetlb_cgroup, and has_normal_memory sysfs reporting.
> > > >
> > > > Fixes: 8d2882a8edb8 ("mm,memory_hotplug: remove status_change_nid_normal and update documentation")
> > >
> > > The Fixes: tag indeed looks correct to me.
> > >
> > > By the way, MM needs an explicit Cc: stable@xxxxxxxxxxxxxxx for backporting.
> > >
> > > Since this commit was introduced in v6.17 and we have v6.18 as LTS,
> > > this should to be backported to v6.18.
> >
> > I had gone back and forth on whether to add the Cc tag, but I'm happy to
> > include it now!
>
> That's OK, I'm very cc:stable-vigilant. Thanks, I'll get this upstreamed during
> this -rc cycle.

Thanks!

>
> I do like our cc:stable patches to include a clear description of the
> userspace-visible impacts of the bug. Two reasons:
>
> - To explain to -stable maintainers why we're requesting the
> backport. If they care. Heck, and to explain to me why I'm doing
> this!
>
> - To help out someone who is using an older kernel (there are many)
> who is dealing with a bug report. They're looking at this changelog
> thinking "hm, I wonder if this patch will fix that bug". Let's add a
> few words in there to help out with their pattern matching.

Agreed, and thanks for spelling out the rationale!

>
> So, and not for the first time ;), what are the userspace-visible
> runtime effects of this bug?
>

The most visible effect is that
/sys/devices/system/node/has_normal_memory does not report a node even
after that node has gained normal memory via hotplug.

Also, list_lru-based shrinkers can undercount objects on such a node and
may skip reclaim on that node entirely, which can lead to a higher memory
footprint than expected.

Feel free to fold the above into the changelog if useful :)

--
Thanks,
Hao