Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

memory_hotplug: optimise try_offline_memory_block()

Extract the zone number directly from the page instead of using the page's
zone number to look up the zone and asking the zone what its number is.

Link: https://lkml.kernel.org/r/20251106201452.2292631-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
20605eb5 c537f0dd

+1 -1
+1 -1
mm/memory_hotplug.c
··· 2327 2327 * by offlining code ... so we don't care about that. 2328 2328 */ 2329 2329 page = pfn_to_online_page(section_nr_to_pfn(mem->start_section_nr)); 2330 - if (page && zone_idx(page_zone(page)) == ZONE_MOVABLE) 2330 + if (page && page_zonenum(page) == ZONE_MOVABLE) 2331 2331 online_type = MMOP_ONLINE_MOVABLE; 2332 2332 2333 2333 rc = device_offline(&mem->dev);