mm-memory_hotplug-dont-check-for-all-holes-in-shrink_zone_span.patch removed from -mm tree
The patch titled
Subject: mm/memory_hotplug: don't check for "all holes" in shrink_zone_span()
has been removed from the -mm tree. Its filename was
mm-memory_hotplug-dont-check-for-all-holes-in-shrink_zone_span.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: David Hildenbrand <[email protected]>
Subject: mm/memory_hotplug: don't check for "all holes" in shrink_zone_span()
If we have holes, the holes will automatically get detected and removed once we remove the next bigger/smaller section. The extra checks can go.
Signed-off-by David Hildenbrand <[email protected]>
Cc Michal Hocko <[email protected]>
Cc "Matthew Wilcox (Oracle)" <[email protected]>
Cc "Aneesh Kumar K.V" <[email protected]>
Cc Pavel Tatashin <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Dan Williams <[email protected]>
Cc Logan Gunthorpe <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Pankaj Gupta <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/memory_hotplug.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-)
mm/memory_hotplug.c renamed from mm/memory_hotplug.c~mm-memory_hotplug-dont-check-for-all-holes-in-shrink_zone_span +7 -23
@@ -411,6 +411,9 @@ static void shrink_zone_span(struct zoneif (pfn) { zone->zone_start_pfn = pfn; zone->spanned_pages = zone_end_pfn - pfn; + }else { + zone->zone_start_pfn =0 ; + zone->spanned_pages =0 ; } }else if (zone_end_pfn == end_pfn) {/*
@@ -423,34 +426,11 @@ static void shrink_zone_span(struct zone start_pfn);if (pfn) zone->spanned_pages = pfn - zone_start_pfn +1 ; +else { + zone->zone_start_pfn =0 ; + zone->spanned_pages =0 ; + } } - -/* -* The section is not biggest or smallest mem_section in the zone, it -* only creates a hole in the zone. So in this case, we need not -* change the zone. But perhaps, the zone has only hole data. Thus -* it check the zone has only hole or not. -*/ - pfn = zone_start_pfn; -for (; pfn < zone_end_pfn; pfn +=PAGES_PER_SUBSECTION ) { -if (unlikely (!pfn_to_online_page (pfn))) -continue ; - -if (page_zone (pfn_to_page (pfn)) != zone) -continue ; - -/* Skip range to be removed */ -if (pfn >= start_pfn && pfn < end_pfn) -continue ; - -/* If we find valid section, we have nothing to do */ -zone_span_writeunlock (zone); -return ; - }