All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikanth Karthikesan <knikanth@suse.de>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: balbir@linux.vnet.ibm.com, containers@lists.linux-foundation.org,
	xemul@openvz.org, linux-mm@kvack.org, nikanth@gmail.com
Subject: Re: [PATCH] Unused check for thread group leader in mem_cgroup_move_task
Date: Mon, 1 Dec 2008 09:51:35 +0530	[thread overview]
Message-ID: <200812010951.36392.knikanth@suse.de> (raw)
In-Reply-To: <20081201101208.08e0aa98.kamezawa.hiroyu@jp.fujitsu.com>

On Monday 01 December 2008 06:42:08 KAMEZAWA Hiroyuki wrote:
> On Sat, 29 Nov 2008 12:59:27 +0530
>
> Nikanth Karthikesan <knikanth@suse.de> wrote:
> > Currently we just check for thread group leader in attach() handler but
> > do nothing!  Either (1) move it to can_attach handler or (2) remove the
> > test itself. I am attaching patches for both below.
> >
> > Thanks
> > Nikanth Karthikesan
> >
> > Move thread group leader check to can_attach handler, but this may
> > prevent non thread group leaders to be moved at all!
> >
> > Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
>
> It's allowed.
>
> Nack.
>

Ok. Then should we remove the unused code which simply checks for thread group 
leader but does nothing?
 
Thanks
Nikanth

Remove the unused test for thread group leader in mem_cgroup_move_task.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>

---

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 866dcc7..8e9287d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1151,14 +1151,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);
 
-	/*
-	 * Only thread group leaders are allowed to migrate, the mm_struct is
-	 * in effect owned by the leader
-	 */
-	if (!thread_group_leader(p))
-		goto out;
-
-out:
 	mmput(mm);
 }
 

--
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>

  parent reply	other threads:[~2008-12-01  4:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-29  7:29 [PATCH] Unused check for thread group leader in mem_cgroup_move_task Nikanth Karthikesan
     [not found] ` <200811291259.27681.knikanth-l3A5Bk7waGM@public.gmane.org>
2008-12-01  1:12   ` KAMEZAWA Hiroyuki
2008-12-01  1:12 ` KAMEZAWA Hiroyuki
     [not found]   ` <20081201101208.08e0aa98.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-12-01  4:21     ` Nikanth Karthikesan
2008-12-01  4:21   ` Nikanth Karthikesan [this message]
     [not found]     ` <200812010951.36392.knikanth-l3A5Bk7waGM@public.gmane.org>
2008-12-01  4:30       ` KAMEZAWA Hiroyuki
2008-12-01  4:30     ` KAMEZAWA Hiroyuki
     [not found]       ` <20081201133030.0a330c7b.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-12-03 13:40         ` Balbir Singh
2008-12-03 13:40           ` Balbir Singh
     [not found]           ` <20081203134024.GD17701-SINUvgVNF2CyUtPGxGje5AC/G2K4zDHf@public.gmane.org>
2008-12-03 16:08             ` [PATCH] Unused check for thread group leader inmem_cgroup_move_task KAMEZAWA Hiroyuki
2008-12-03 16:08           ` KAMEZAWA Hiroyuki
  -- strict thread matches above, loose matches on Subject: below --
2008-11-29  7:29 [PATCH] Unused check for thread group leader in mem_cgroup_move_task Nikanth Karthikesan

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=200812010951.36392.knikanth@suse.de \
    --to=knikanth@suse.de \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=nikanth@gmail.com \
    --cc=xemul@openvz.org \
    /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 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.