+ mm-mempolicyc-remove-unnecessary-nodemask-check-in-kernel_migrate_pages.patch added to -mm tree

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

 



The patch titled
     Subject: mm/mempolicy.c: remove unnecessary nodemask check in kernel_migrate_pages()
has been added to the -mm tree.  Its filename is
     mm-mempolicyc-remove-unnecessary-nodemask-check-in-kernel_migrate_pages.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-mempolicyc-remove-unnecessary-nodemask-check-in-kernel_migrate_pages.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-mempolicyc-remove-unnecessary-nodemask-check-in-kernel_migrate_pages.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: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
Subject: mm/mempolicy.c: remove unnecessary nodemask check in kernel_migrate_pages()

1) task_nodes = cpuset_mems_allowed(current);
   -> cpuset_mems_allowed() guaranteed to return some non-empty
      subset of node_states[N_MEMORY].

2) nodes_and(*new, *new, task_nodes);
   -> after nodes_and(), the 'new' should be empty or appropriate
      nodemask(online node and with memory).

After 1) and 2), we could remove unnecessary check whether the 'new'
AND node_states[N_MEMORY] is empty.

Link: http://lkml.kernel.org/r/20190806023634.55356-1-wangkefeng.wang@xxxxxxxxxx
Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/mempolicy.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/mm/mempolicy.c~mm-mempolicyc-remove-unnecessary-nodemask-check-in-kernel_migrate_pages
+++ a/mm/mempolicy.c
@@ -1513,10 +1513,6 @@ static int kernel_migrate_pages(pid_t pi
 	if (nodes_empty(*new))
 		goto out_put;
 
-	nodes_and(*new, *new, node_states[N_MEMORY]);
-	if (nodes_empty(*new))
-		goto out_put;
-
 	err = security_task_movememory(task);
 	if (err)
 		goto out_put;
_

Patches currently in -mm which might be from wangkefeng.wang@xxxxxxxxxx are

mm-mempolicyc-remove-unnecessary-nodemask-check-in-kernel_migrate_pages.patch
thp-update-split_huge_page_pmd-commnet.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