linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hao Li <hao.li@linux.dev>
To: "Harry Yoo (Oracle)" <harry@kernel.org>
Cc: david@kernel.org, osalvador@suse.de, akpm@linux-foundation.org,
	 vbabka@suse.cz, joshua.hahnjy@gmail.com, linux-mm@kvack.org,
	 linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org
Subject: Re: [PATCH v2] mm/memory_hotplug: maintain N_NORMAL_MEMORY during hotplug
Date: Mon, 30 Mar 2026 17:34:21 +0800	[thread overview]
Message-ID: <23feu42lqvc7iymgaxmnywea7c3qie5vmjm4aijbgdiazwvrcb@mmlxjowgtotv> (raw)
In-Reply-To: <aco0MtqpysMXMZdy@hyeyoo>

On Mon, Mar 30, 2026 at 05:28:34PM +0900, Harry Yoo (Oracle) wrote:
> On Mon, Mar 30, 2026 at 11:57:49AM +0800, Hao Li wrote:
> > N_NORMAL_MEMORY is initialized from zone population at boot, but memory
> > hotplug currently only updates N_MEMORY. As a result, a node that gains
> > normal memory via hotplug can remain invisible to users iterating over
> > N_NORMAL_MEMORY, while a node that loses its last normal memory can stay
> > incorrectly marked as such.
> > 
> > Restore N_NORMAL_MEMORY maintenance directly in online_pages() and
> > offline_pages(). Set the bit when a node that currently lacks normal
> > memory onlines pages into a zone <= ZONE_NORMAL, and clear it when
> > offlining removes the last present pages from zones <= ZONE_NORMAL.
> > 
> > This restores the intended semantics without bringing back the old
> > status_change_nid_normal notifier plumbing which was removed in
> > 8d2882a8edb8.
> > 
> > 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@vger.kernel.org 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!

> 
> > Signed-off-by: Hao Li <hao.li@linux.dev>
> > ---
> 
> Otherwise looks good to me,
> Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org>

Thanks for the review!

-- 
Thanks,
Hao


  reply	other threads:[~2026-03-30  9:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30  3:57 Hao Li
2026-03-30  8:28 ` Harry Yoo (Oracle)
2026-03-30  9:34   ` Hao Li [this message]
2026-03-30 21:46     ` Andrew Morton
2026-03-31  4:24       ` Hao Li
2026-03-31  5:15         ` Andrew Morton
2026-03-30 12:07 ` Vlastimil Babka (SUSE)
2026-03-30 13:53 ` Joshua Hahn
2026-03-30 14:20 ` David Hildenbrand (Arm)
2026-03-31  4:14   ` Hao Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23feu42lqvc7iymgaxmnywea7c3qie5vmjm4aijbgdiazwvrcb@mmlxjowgtotv \
    --to=hao.li@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=harry@kernel.org \
    --cc=joshua.hahnjy@gmail.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox