+ mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4.patch added to -mm tree

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

 



The patch titled
     Subject: mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4
has been added to the -mm tree.  Its filename is
     mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4.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: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Subject: mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4

fix review comments from Vlastimil

Link: http://lkml.kernel.org/r/1563556862-54056-3-git-send-email-yang.shi@xxxxxxxxxxxxxxxxx
Signed-off-by: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/mempolicy.c |   22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

--- a/mm/mempolicy.c~mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4
+++ a/mm/mempolicy.c
@@ -538,7 +538,7 @@ static int queue_pages_pte_range(pmd_t *
 			 * need migrate other LRU pages.
 			 */
 			if (migrate_page_add(page, qp->pagelist, flags))
-				has_unmovable |= true;
+				has_unmovable = true;
 		} else
 			break;
 	}
@@ -971,17 +971,6 @@ static int migrate_page_add(struct page
 				unsigned long flags)
 {
 	struct page *head = compound_head(page);
-
-	/*
-	 * Non-movable page may reach here.  And, there may be
-	 * temporaty off LRU pages or non-LRU movable pages.
-	 * Treat them as unmovable pages since they can't be
-	 * isolated, so they can't be moved at the moment.  It
-	 * should return -EIO for this case too.
-	 */
-	if (!PageLRU(head) && (flags & MPOL_MF_STRICT))
-		return -EIO;
-
 	/*
 	 * Avoid migrating a page that is shared with others.
 	 */
@@ -991,6 +980,15 @@ static int migrate_page_add(struct page
 			mod_node_page_state(page_pgdat(head),
 				NR_ISOLATED_ANON + page_is_file_cache(head),
 				hpage_nr_pages(head));
+		} else if (flags & MPOL_MF_STRICT) {
+			/*
+			 * Non-movable page may reach here.  And, there may be
+			 * temporary off LRU pages or non-LRU movable pages.
+			 * Treat them as unmovable pages since they can't be
+			 * isolated, so they can't be moved at the moment.  It
+			 * should return -EIO for this case too.
+			 */
+			return -EIO;
 		}
 	}
 
_

Patches currently in -mm which might be from yang.shi@xxxxxxxxxxxxxxxxx are

revert-kmemleak-allow-to-coexist-with-fault-injection.patch
mm-vmscan-check-if-mem-cgroup-is-disabled-or-not-before-calling-memcg-slab-shrinker.patch
mm-mempolicy-make-the-behavior-consistent-when-mpol_mf_move-and-mpol_mf_strict-were-specified.patch
mm-mempolicy-make-the-behavior-consistent-when-mpol_mf_move-and-mpol_mf_strict-were-specified-v4.patch
mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind.patch
mm-mempolicy-handle-vma-with-unmovable-pages-mapped-correctly-in-mbind-v4.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