+ mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix.patch added to -mm tree

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

 



The patch titled
     Subject: mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix
has been added to the -mm tree.  Its filename is
     mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix

fix brace layout, per David.  Also reduce indentation

Cc: Anthony Yznaga <anthony.yznaga@xxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memory_hotplug.c |   37 ++++++++++++++++++-------------------
 1 file changed, 18 insertions(+), 19 deletions(-)

--- a/mm/memory_hotplug.c~mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix
+++ a/mm/memory_hotplug.c
@@ -1305,28 +1305,27 @@ int test_pages_in_a_zone(unsigned long s
 static unsigned long scan_movable_pages(unsigned long start, unsigned long end)
 {
 	unsigned long pfn;
-	struct page *page;
+
 	for (pfn = start; pfn < end; pfn++) {
-		if (pfn_valid(pfn)) {
-			page = pfn_to_page(pfn);
-			if (PageLRU(page))
-				return pfn;
-			if (__PageMovable(page))
-				return pfn;
-			if (PageHuge(page)) {
-				struct page *head = compound_head(page);
+		struct page *page, *head;
+		unsigned long skip;
 
-				if (hugepage_migration_supported(page_hstate(head)) &&
-				    page_huge_active(head))
-					return pfn;
-				else {
-					unsigned long skip;
+		if (!pfn_valid(pfn))
+			continue;
+		page = pfn_to_page(pfn);
+		if (PageLRU(page))
+			return pfn;
+		if (__PageMovable(page))
+			return pfn;
 
-					skip = (1 << compound_order(head)) - (page - head);
-					pfn += skip - 1;
-				}
-			}
-		}
+		if (!PageHuge(page))
+			continue;
+		head = compound_head(page);
+		if (hugepage_migration_supported(page_hstate(head)) &&
+		    page_huge_active(head))
+			return pfn;
+		skip = (1 << compound_order(head)) - (page - head);
+		pfn += skip - 1;
 	}
 	return 0;
 }
_

Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are

proc-fix-proc-net-after-setns2-checkpatch-fixes.patch
proc-fix-proc-net-after-setns2-checkpatch-fixes-fix.patch
mmmemory_hotplug-fix-scan_movable_pages-for-gigantic-hugepages-fix.patch
ocfs2-clear-zero-in-unaligned-direct-io-checkpatch-fixes.patch
mm.patch
mm-slub-introduce-slab_warn_on_error-fix.patch
memory_hotplug-free-pages-as-higher-order-fix.patch
memory_hotplug-free-pages-as-higher-order-fix-fix.patch
mm-convert-pg_balloon-to-pg_offline-fix.patch
mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix.patch
mm-swap-check-if-swap-backing-device-is-congested-or-not-fix.patch
mmslabvmscan-accumulate-gradual-pressure-on-small-slabs-fix.patch
mm-proportional-memorylowmin-reclaim-checkpatch-fixes.patch
mm-mmu_notifier-contextual-information-for-event-triggering-invalidation-v2-fix-fix.patch
filemap-kill-page_cache_read-usage-in-filemap_fault-fix.patch
filemap-drop-the-mmap_sem-for-all-blocking-operations-checkpatch-fixes.patch
ipc-allow-boot-time-extension-of-ipcmni-from-32k-to-8m-checkpatch-fixes.patch
linux-next-rejects.patch
linux-next-git-rejects.patch
scripts-atomic-check-atomicssh-dont-assume-that-scripts-are-executable.patch
kernel-forkc-export-kernel_thread-to-modules.patch
slab-leaks3-default-y.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