Re: [PATCH v1] drivers/base/node.c: Simplify unregister_memory_block_under_nodes()
From: David Hildenbrand
Date: Fri Jul 19 2019 - 05:05:57 EST
On 19.07.19 10:42, Michal Hocko wrote:
> On Thu 18-07-19 16:22:39, David Hildenbrand wrote:
>> We don't allow to offline memory block devices that belong to multiple
>> numa nodes. Therefore, such devices can never get removed. It is
>> sufficient to process a single node when removing the memory block.
>>
>> Remember for each memory block if it belongs to no, a single, or mixed
>> nodes, so we can use that information to skip unregistering or print a
>> warning (essentially a safety net to catch BUGs).
>
> I do not really like NUMA_NO_NODE - 1 thing. This is yet another invalid
> node that is magic. Why should we even care? In other words why is this
> patch an improvement?
Oh, and to answer that part of the question:
We no longer have to iterate over each pfn of a memory block to be removed.
--
Thanks,
David / dhildenb