Re: [PATCH 1/2] mm,memory_hotplug: Implement numa node notifier

From: Oscar Salvador
Date: Fri Apr 04 2025 - 08:56:49 EST


On Fri, Apr 04, 2025 at 12:09:39PM +0200, David Hildenbrand wrote:
> Assuming we can remove the _normal stuff and we can do what we do in patch
> #2 here already ... meaning we unconditionally store the nid in the MEM
> notifier ...
>
> What about extending the existing memory notifier instead?
>
> That is, we add
>
> MEM_NODE_BECOMING_MEM_AWARE ... and trigger it using the same notifier
> chain. We only have to make sure these new events will be properly filtered
> out (IIRC, for most we do that already).
>
> Of course, the range will not apply to these events, but the nid would apply
> to all.

But that would defeat the purpose of having a diferent notifier for
those only interested in node changes, which is not having to bother at
all with unrelated notifications.

Yes, the handling would be simpler than it is now, but honestly I still see value
in having them both decoupled from eacher other, I think it is cleaner
and expresses in a more clear way the change of what the consumer is interested in
get notified for.

Unless there is a strong objection, I would pursue that path, getting
rid of the _normal stuff for slub along the way.


--
Oscar Salvador
SUSE Labs