[folded-merged] mm-hotplug-prepare-shrink_zone-pgdat_span-for-sub-section-removal-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm,memory_hotplug: fix shrink_{zone,node}_span
has been removed from the -mm tree.  Its filename was
     mm-hotplug-prepare-shrink_zone-pgdat_span-for-sub-section-removal-fix.patch

This patch was dropped because it was folded into mm-hotplug-prepare-shrink_zone-pgdat_span-for-sub-section-removal.patch

------------------------------------------------------
From: Oscar Salvador <osalvador@xxxxxxx>
Subject: mm,memory_hotplug: fix shrink_{zone,node}_span

Since [1], shrink_{zone,node}_span work on PAGES_PER_SUBSECTION
granularity.  We need to adapt the loop that checks whether a zone/node
contains only holes, and skip the whole range to be removed.

Otherwise, since sub-sections belonging to the range to be removed have
not yet been deactivated, pfn_valid() will return true on those and we
will be left with a wrong accounting of spanned_pages, both for the zone
and the node.

Link: http://lkml.kernel.org/r/20190717090725.23618-3-osalvador@xxxxxxx
Fixes: mmotm ("mm/hotplug: prepare shrink_{zone, pgdat}_span for sub-section removal")
Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
Reviewed-by: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memory_hotplug.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/mm/memory_hotplug.c~mm-hotplug-prepare-shrink_zone-pgdat_span-for-sub-section-removal-fix
+++ a/mm/memory_hotplug.c
@@ -409,8 +409,8 @@ static void shrink_zone_span(struct zone
 		if (page_zone(pfn_to_page(pfn)) != zone)
 			continue;
 
-		 /* If the section is current section, it continues the loop */
-		if (start_pfn == pfn)
+		/* Skip range to be removed */
+		if (pfn >= start_pfn && pfn < end_pfn)
 			continue;
 
 		/* If we find valid section, we have nothing to do */
@@ -474,8 +474,8 @@ static void shrink_pgdat_span(struct pgl
 		if (pfn_to_nid(pfn) != nid)
 			continue;
 
-		 /* If the section is current section, it continues the loop */
-		if (start_pfn == pfn)
+		/* Skip range to be removed */
+		if (pfn >= start_pfn && pfn < end_pfn)
 			continue;
 
 		/* If we find valid section, we have nothing to do */
_

Patches currently in -mm which might be from osalvador@xxxxxxx are

mm-hotplug-prepare-shrink_zone-pgdat_span-for-sub-section-removal.patch
mm-sparsemem-support-sub-section-hotplug-fix.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux