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

David Hildenbrand
2025-04-04T13:15:04Z

On 04.04.25 14:56, Oscar Salvador wrote:
> 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.

No strong opinion, just a thought.

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

Yeah, getting rid of _normal and just have a "nid" will make things a
lot cleaner.

--
Cheers,

David / dhildenb