* [merged] cpuset-remove-unneeded-nodemask_alloc-in-cpuset_attch.patch removed from -mm tree
@ 2011-03-25 7:25 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2011-03-25 7:25 UTC (permalink / raw)
To: lizf, menage, miaox, rientjes, mm-commits
The patch titled
cpuset: remove unneeded NODEMASK_ALLOC() in cpuset_attach()
has been removed from the -mm tree. Its filename was
cpuset-remove-unneeded-nodemask_alloc-in-cpuset_attch.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: cpuset: remove unneeded NODEMASK_ALLOC() in cpuset_attach()
From: Li Zefan <lizf@cn.fujitsu.com>
oldcs->mems_allowed is not modified during cpuset_attach(), so we don't
have to copy it to a buffer allocated by NODEMASK_ALLOC(). Just pass it
to cpuset_migrate_mm().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/cpuset.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff -puN kernel/cpuset.c~cpuset-remove-unneeded-nodemask_alloc-in-cpuset_attch kernel/cpuset.c
--- a/kernel/cpuset.c~cpuset-remove-unneeded-nodemask_alloc-in-cpuset_attch
+++ a/kernel/cpuset.c
@@ -1438,10 +1438,9 @@ static void cpuset_attach(struct cgroup_
struct mm_struct *mm;
struct cpuset *cs = cgroup_cs(cont);
struct cpuset *oldcs = cgroup_cs(oldcont);
- NODEMASK_ALLOC(nodemask_t, from, GFP_KERNEL);
NODEMASK_ALLOC(nodemask_t, to, GFP_KERNEL);
- if (from == NULL || to == NULL)
+ if (to == NULL)
goto alloc_fail;
if (cs == &top_cpuset) {
@@ -1463,18 +1462,16 @@ static void cpuset_attach(struct cgroup_
}
/* change mm; only needs to be done once even if threadgroup */
- *from = oldcs->mems_allowed;
*to = cs->mems_allowed;
mm = get_task_mm(tsk);
if (mm) {
mpol_rebind_mm(mm, to);
if (is_memory_migrate(cs))
- cpuset_migrate_mm(mm, from, to);
+ cpuset_migrate_mm(mm, &oldcs->mems_allowed, to);
mmput(mm);
}
alloc_fail:
- NODEMASK_FREE(from);
NODEMASK_FREE(to);
}
_
Patches currently in -mm which might be from lizf@cn.fujitsu.com are
origin.patch
cgroup-remove-the-ns_cgroup.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-25 7:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 7:25 [merged] cpuset-remove-unneeded-nodemask_alloc-in-cpuset_attch.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.