From: Oscar Salvador <osalvador@suse.de>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
mkoutny@suse.com, Dan Williams <dan.j.williams@intel.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 1/2] mm,memory_hotplug: Implement numa node notifier
Date: Wed, 2 Apr 2025 18:57:42 +0200 [thread overview]
Message-ID: <Z-1shl4h4fpfKyxb@localhost.localdomain> (raw)
In-Reply-To: <4e122668-6f6a-4874-85df-e6869b9ccb24@suse.cz>
On Wed, Apr 02, 2025 at 06:03:04PM +0200, Vlastimil Babka wrote:
> On 4/1/25 11:27, Oscar Salvador wrote:
> > - arg.start_pfn = pfn;
> > - arg.nr_pages = nr_pages;
> > - node_states_check_changes_online(nr_pages, zone, &arg);
> > + mem_arg.start_pfn = pfn;
> > + mem_arg.nr_pages = nr_pages;
> > + node_states_check_changes_online(nr_pages, zone, &node_arg);
> >
> > - ret = memory_notify(MEM_GOING_ONLINE, &arg);
> > + if (node_arg.status_change_nid >= 0) {
>
> Hmm, don't we need to add "|| node_arg.status_change_nid_normal >= 0"? Or we
> fail to notify addition of normal memory to a node that already has !normal
> memory?
Ah, I think you are right, nice catch.
Yes, if we add normal (<= ZONE_NORMAL) memory to a node that only has ZONE_MOVABLE,
status_change_nid_normal will change, but status_change_nid will not.
So yes, we need a "|| node_arg.status_change_nid_normal >= 0".
> > - memory_notify(MEM_CANCEL_ONLINE, &arg);
> > + if (cancel_node_notifier_on_err)
> > + node_notify(NODE_CANCEL_MEM_AWARE, &node_arg);
> > + if (cancel_mem_notifier_on_err)
> > + memory_notify(MEM_CANCEL_ONLINE, &mem_arg);
>
> Switch the order of those just for symmetry? :)
Will do.
> > - arg.start_pfn = start_pfn;
> > - arg.nr_pages = nr_pages;
> > - node_states_check_changes_offline(nr_pages, zone, &arg);
> > + mem_arg.start_pfn = start_pfn;
> > + mem_arg.nr_pages = nr_pages;
> > + node_states_check_changes_offline(nr_pages, zone, &node_arg);
> > +
> > + if (node_arg.status_change_nid >= 0) {
>
> Ditto.
Yap.
> > failed_removal_isolated:
> > /* pushback to free area */
> > undo_isolate_page_range(start_pfn, end_pfn, MIGRATE_MOVABLE);
> > - memory_notify(MEM_CANCEL_OFFLINE, &arg);
> > + if (cancel_node_notifier_on_err)
> > + node_notify(NODE_CANCEL_MEMORYLESS, &node_arg);
> > + if (cancel_mem_notifier_on_err)
> > + memory_notify(MEM_CANCEL_OFFLINE, &mem_arg);
>
> Ditto.
Copy that.
Thanks Vlastimil!
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2025-04-02 16:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 9:27 [PATCH 0/2] " Oscar Salvador
2025-04-01 9:27 ` [PATCH 1/2] mm,memory_hotplug: " Oscar Salvador
2025-04-01 14:19 ` Harry Yoo
2025-04-02 16:03 ` Vlastimil Babka
2025-04-02 16:57 ` Oscar Salvador [this message]
2025-04-03 12:44 ` Jonathan Cameron
2025-04-04 10:09 ` David Hildenbrand
2025-04-04 12:56 ` Oscar Salvador
2025-04-04 13:14 ` David Hildenbrand
2025-04-01 9:27 ` [PATCH 2/2] mm,memory_hotplug: Replace status_change_nid parameter in memory_notify Oscar Salvador
2025-04-02 2:53 ` Harry Yoo
2025-04-02 16:09 ` Vlastimil Babka
2025-04-02 16:06 ` [PATCH 0/2] Implement numa node notifier Vlastimil Babka
2025-04-02 17:03 ` Oscar Salvador
2025-04-03 13:02 ` David Hildenbrand
2025-04-03 13:08 ` David Hildenbrand
2025-04-03 13:57 ` Harry Yoo
2025-04-04 8:47 ` Vlastimil Babka
2025-04-03 22:06 ` Harry Yoo
2025-04-04 8:50 ` Vlastimil Babka
2025-04-04 10:02 ` Harry Yoo
2025-04-03 12:29 ` Jonathan Cameron
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=Z-1shl4h4fpfKyxb@localhost.localdomain \
--to=osalvador@suse.de \
--cc=42.hyeyoo@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mkoutny@suse.com \
--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