Re: [PATCH v5 1/2] mm: memory_hotplug: enumerate all supported section flags

From: David Hildenbrand
Date: Tue Jun 21 2022 - 03:40:19 EST


On 20.06.22 13:06, Muchun Song wrote:
> We are almost running out of section flags, only one bit is available in
> the worst case (powerpc with 256k pages). However, there are still some
> free bits (in ->section_mem_map) on other architectures (e.g. x86_64 has
> 10 bits available, arm64 has 8 bits available with worst case of 64K
> pages). We have hard coded those numbers in code, it is inconvenient to
> use those bits on other architectures except powerpc. So transfer those
> section flags to enumeration to make it easy to add new section flags in
> the future. Also, move SECTION_TAINT_ZONE_DEVICE into the scope of
> CONFIG_ZONE_DEVICE to save a bit on non-zone-device case.
>
> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>

--
Thanks,

David / dhildenb