Skip to contentSkip to conversation

memcg: remove redundant check in move_task()

PATCH In review Li Zefan 3 participants 3 messages Jul 28, 2008 – Jul 29, 2008 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/1 memcg: remove redundant check in move_task()

It's guaranteed by cgroup that old_cgrp != cgrp.

---
 mm/memcontrol.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
mm/memcontrol.c +0 -3
index fba566c..7056c3b 100644
@@ -1168,9 +1168,6 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
 	mem = mem_cgroup_from_cont(cont);
 	old_mem = mem_cgroup_from_cont(old_cont);
 
-	if (mem == old_mem)
-		goto out;
-
 	/*
 	 * Only thread group leaders are allowed to migrate, the mm_struct is
 	 * in effect owned by the leader
Signature · 1 line
1.5.4.rc3

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 3 lines · On Mon, 28 Jul 2008 10:28:27 +0800 Li Zefan…

It's guaranteed by cgroup that old_cgrp != cgrp.

Thank you.
Hmm.. I like BUG_ON() to show that "this will never happen" rather than just removing.

Anyway. I ack this.

Quoted 28 lines
---
 mm/memcontrol.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
mm/memcontrol.c +0 -3
index fba566c..7056c3b 100644
@@ -1168,9 +1168,6 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
 	mem = mem_cgroup_from_cont(cont);
 	old_mem = mem_cgroup_from_cont(old_cont);
 
-	if (mem == old_mem)
-		goto out;
-
 	/*
 	 * Only thread group leaders are allowed to migrate, the mm_struct is
 	 * in effect owned by the leader
Signature · 8 lines
1.5.4.rc3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Acked-by on v1 1/1
#3 lore raw
In reply to Li Zefan
Quoted 3 lines · On Mon, 28 Jul 2008 10:28:27 +0800 Li Zefan <[email protected]> wrote:

It's guaranteed by cgroup that old_cgrp != cgrp.

Thank you.
Hmm.. I like BUG_ON() to show that "this will never happen" rather than just removing.

Anyway. I ack this.

Quoted 28 lines
---
 mm/memcontrol.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
mm/memcontrol.c +0 -3
index fba566c..7056c3b 100644
@@ -1168,9 +1168,6 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
 	mem = mem_cgroup_from_cont(cont);
 	old_mem = mem_cgroup_from_cont(old_cont);
 
-	if (mem == old_mem)
-		goto out;
-
 	/*
 	 * Only thread group leaders are allowed to migrate, the mm_struct is
 	 * in effect owned by the leader
Signature · 8 lines
1.5.4.rc3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/