linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miao Xie <miaox@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Paul Menage <menage@google.com>,
	Lee Schermerhorn <lee.schermerhorn@hp.com>,
	Nick Piggin <npiggin@suse.de>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>,
	Linux-MM <linux-mm@kvack.org>
Subject: [PATCH V2 1/2] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node - fix
Date: Mon, 15 Mar 2010 13:20:06 +0800	[thread overview]
Message-ID: <4B9DC386.1020601@cn.fujitsu.com> (raw)

Changes from V1 to V2:
- none.

Remove unnecessary smp_wmb().

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
---
Against the following patch in mmotm-2010-03-11-13-13:
cpuset-fix-the-problem-that-cpuset_mem_spread_node-returns-an-offline-node.patch
---
 kernel/cpuset.c |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index b15c01c..f36e577 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -933,23 +933,9 @@ static void cpuset_migrate_mm(struct mm_struct *mm, const nodemask_t *from,
 
 	tsk->mems_allowed = *to;
 
-	/*
-	 * After current->mems_allowed is set to a new value, current will
-	 * allocate new pages for the migrating memory region. So we must
-	 * ensure that update of current->mems_allowed have been completed
-	 * by this moment.
-	 */
-	smp_wmb();
 	do_migrate_pages(mm, from, to, MPOL_MF_MOVE_ALL);
 
 	guarantee_online_mems(task_cs(tsk),&tsk->mems_allowed);
-
-	/*
-	 * After doing migrate pages, current will allocate new pages for
-	 * itself not the other tasks. So we must ensure that update of
-	 * current->mems_allowed have been completed by this moment.
-	 */
-	smp_wmb();
 }
 
 /*
-- 
1.6.5.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2010-03-15  5:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B9DC386.1020601@cn.fujitsu.com \
    --to=miaox@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=menage@google.com \
    --cc=npiggin@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).