linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hao Li <hao.li@linux.dev>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>,
	 Joshua Hahn <joshua.hahnjy@gmail.com>,
	osalvador@suse.de, akpm@linux-foundation.org, vbabka@suse.cz,
	 harry.yoo@oracle.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,  linux-cxl@vger.kernel.org
Subject: Re: [PATCH] mm/memory_hotplug: maintain N_NORMAL_MEMORY during hotplug
Date: Sat, 28 Mar 2026 12:09:24 +0800	[thread overview]
Message-ID: <5omwfganlhwbmllrmab6f2v473rrgirvbtqrcouj6tz4karzjb@xiheplfxwap5> (raw)
In-Reply-To: <c3b10a9b-d3a8-4e5a-8cf9-3ddb172d2c0e@kernel.org>

On Fri, Mar 27, 2026 at 04:22:52PM +0100, David Hildenbrand (Arm) wrote:
> On 3/27/26 15:44, Vlastimil Babka (SUSE) wrote:
> > On 3/27/26 15:38, Joshua Hahn wrote:
> >> On Fri, 27 Mar 2026 20:42:47 +0800 Hao Li <hao.li@linux.dev> wrote:
> >>
> >> Hello Hao,
> >>
> >> I hope you are doing well, thank you for the patch!
> >>
> >>> 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.
> >>
> >> The second part feels more important than the second part, doing a quick
> >> glance through the code I can see a few N_NORMAL_MEMORY iterators that
> > 
> > Note in practice it's unlikely that a node would hotplug normal memory,
> > start using it, and then manage to successfully hotremove it, due to
> > unmovable allocations. Most likely only ZONE_MOVABLE memory can get hotremoved.
> 
> Yes, hotunplug of all normal memory of a node is unlikely. Possible, but
> nothing to optimize for.

Yes, I agree that fully hot-unplugging the last normal-memory node is probably
uncommon.

That said, once we restore the set side, clearing it feels like the symmetric
counterpart as well. If we leave the clear side as-is, it seems like it could
be a bit confusing for others later on.

-- 
Thanks,
Hao


  reply	other threads:[~2026-03-28  4:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27 12:42 Hao Li
2026-03-27 14:38 ` Joshua Hahn
2026-03-27 14:44   ` Vlastimil Babka (SUSE)
2026-03-27 15:22     ` David Hildenbrand (Arm)
2026-03-28  4:09       ` Hao Li [this message]
2026-03-27 16:35     ` Joshua Hahn
2026-03-28  4:03       ` Hao Li
2026-03-30 11:43         ` Vlastimil Babka (SUSE)
2026-03-27 15:28   ` David Hildenbrand (Arm)
2026-03-28  4:12     ` Hao Li
2026-03-28  3:47   ` 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=5omwfganlhwbmllrmab6f2v473rrgirvbtqrcouj6tz4karzjb@xiheplfxwap5 \
    --to=hao.li@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=harry.yoo@oracle.com \
    --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@kernel.org \
    --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