diff options
| author | David Hildenbrand (Arm) <david@kernel.org> | 2026-09-20 04:49:45 -0400 |
|---|---|---|
| committer | David Hildenbrand (Arm) <david@kernel.org> | 2026-09-23 16:21:54 +0200 |
| commit | 1a3fed3487f89cbd08de3fd0e94cf94c47e74646 (patch) | |
| tree | 81e03605979baa532e64ca58d183f9bc8ca714a1 /tools/lib/python/kdoc/parse_data_structs.py | |
| parent | 93f51579e7df248780214094418f205253383cc5 (diff) | |
| download | linux-next-1a3fed3487f89cbd08de3fd0e94cf94c47e74646.tar.gz linux-next-1a3fed3487f89cbd08de3fd0e94cf94c47e74646.zip | |
mm/memory_hotplug: make shrink_zone_span() more robust
Let's make shrink_zone_span() more robust by checking in
find_smallest_section_pfn() / find_biggest_section_pfn() that the
start or end PFN of the subsection is within the zone.
While at it, clean up the function by factoring the core check out
into subsection_overlaps_zone().
There likely is no need to check the nid first. We require
SPARSEMEM_VMEMMAP_ENABLE, where pfn_to_page() is cheap, and
pfn_to_nid() on CONFIG_NUMA would call pfn_to_page() either way.
So let's just drop that for now.
Tested-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Link: https://patch.msgid.link/20260920084946.3266279-2-yuan1.liu@intel.com
Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions
