Re: [PATCH v6 03/10] mm,memory_hotplug: Implement numa node notifier

From: David Hildenbrand
Date: Mon Jun 16 2025 - 08:21:17 EST


On 16.06.25 13:45, Oscar Salvador wrote:
On Mon, Jun 16, 2025 at 10:52:31AM +0200, David Hildenbrand wrote:
Probably worth checking, to make sure we don't have accidental bugs in there
...

I did a quick sweep, and we should be cool since users of the node notifier
don't really use *_CANCEL* action. Only ADDED/REMOVED.

Now, users of memory notifier is a different story.
E.g: page_ext will call offline_page_ext to mark the section->page_ext invalid.

online_page_ext does:

base = alloc_page_ext(table_size, nid);
section->page_ext = (void *)base - page_ext_size * pfn;

This is fine, I think, offline_page_ext will not mark it as INVALID because
section->page_ext is NULL, so we just skip it.

This is just one example. I checked some others like kasan and hyperv and they
seem fine.
And anyway, the we could already hit this situation with MEM_* notifiers, so
nothing new.

Exactly. I recall I checked some of them in the past as well, when I stumbled over this behavior.

--
Cheers,

David / dhildenb