All of lore.kernel.org
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Tejun Heo <tj@kernel.org>
Cc: fweisbec@gmail.com, containers@lists.linux-foundation.org,
	lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org, paul@paulmenage.org
Subject: Re: [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc()
Date: Fri, 26 Aug 2011 13:13:59 +0900	[thread overview]
Message-ID: <20110826131359.096a8131.kamezawa.hiroyu__28633.0732437365$1314332542$gmane$org@jp.fujitsu.com> (raw)
In-Reply-To: <1314312192-26885-3-git-send-email-tj@kernel.org>

On Fri, 26 Aug 2011 00:43:08 +0200
Tejun Heo <tj@kernel.org> wrote:

> cgroup_attach_proc() behaves differently from cgroup_attach_task() in
> the following aspects.
> 
> * All hooks are invoked even if no task is actually being moved.
> 
> * ->can_attach_task() is called for all tasks in the group whether the
>   new cgrp is different from the current cgrp or not; however,
>   ->attach_task() is skipped if new equals new.  This makes the calls
>   asymmetric.
> 
> This patch improves old cgroup handling in cgroup_attach_proc() by
> looking up the current cgroup at the head, recording it in the flex
> array along with the task itself, and using it to remove the above two
> differences.  This will also ease further changes.
> 
> -v2: nr_todo renamed to nr_migrating_tasks as per Paul Menage's
>      suggestion.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Acked-by: Paul Menage <paul@paulmenage.org>
> Cc: Li Zefan <lizf@cn.fujitsu.com>

Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

  reply	other threads:[~2011-08-26  4:13 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 22:43 [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods, take#2 Tejun Heo
2011-08-25 22:43 ` [PATCH 1/6] cgroup: subsys->attach_task() should be called after migration Tejun Heo
2011-08-25 22:43 ` Tejun Heo
2011-08-26  4:12   ` KAMEZAWA Hiroyuki
2011-08-26  4:12   ` KAMEZAWA Hiroyuki
     [not found]   ` <1314312192-26885-2-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:12     ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc() Tejun Heo
2011-08-26  4:13   ` KAMEZAWA Hiroyuki [this message]
     [not found]   ` <1314312192-26885-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:13     ` KAMEZAWA Hiroyuki
2011-08-26  4:13   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` Tejun Heo
2011-08-25 22:43 ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-26  2:38   ` Matt Helsley
     [not found]   ` <1314312192-26885-4-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  2:38     ` Matt Helsley
2011-08-26  4:16     ` KAMEZAWA Hiroyuki
2011-08-26  2:38   ` Matt Helsley
2011-08-26  2:48     ` Matt Helsley
2011-08-26  2:48     ` Matt Helsley
2011-08-26  6:40     ` Tejun Heo
     [not found]     ` <20110826023818.GC3457-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2011-08-26  2:48       ` Matt Helsley
2011-08-26  6:40       ` Tejun Heo
2011-08-26 15:54       ` Paul Menage
2011-08-26  6:40     ` Tejun Heo
2011-08-26 15:54     ` Paul Menage
2011-08-26 15:54     ` Paul Menage
2011-08-26  4:16   ` KAMEZAWA Hiroyuki
2011-08-26  4:16   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` Tejun Heo
2011-08-25 22:43 ` [PATCH 4/6] cgroup: don't use subsys->can_attach_task() or ->attach_task() Tejun Heo
2011-08-25 22:43 ` Tejun Heo
     [not found]   ` <1314312192-26885-5-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:18     ` KAMEZAWA Hiroyuki
2011-08-26  4:18   ` KAMEZAWA Hiroyuki
2011-08-26  4:18   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` [PATCH 5/6] cgroup, cpuset: don't use ss->pre_attach() Tejun Heo
2011-08-25 22:43 ` Tejun Heo
     [not found]   ` <1314312192-26885-6-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:19     ` KAMEZAWA Hiroyuki
2011-08-26  4:19   ` KAMEZAWA Hiroyuki
2011-08-26  4:19   ` KAMEZAWA Hiroyuki
2011-08-25 22:43 ` [PATCH 6/6] cgroup: kill subsys->can_attach_task(), pre_attach() and attach_task() Tejun Heo
2011-08-26  4:20   ` KAMEZAWA Hiroyuki
2011-08-26  4:20   ` KAMEZAWA Hiroyuki
2011-08-30 20:10   ` Frederic Weisbecker
2011-08-31  7:03     ` Tejun Heo
2011-08-31 13:42       ` Frederic Weisbecker
2011-08-31 13:42       ` Frederic Weisbecker
2011-09-01 11:22         ` Tejun Heo
2011-09-01 11:22         ` Tejun Heo
2011-09-01 11:22         ` Tejun Heo
     [not found]           ` <20110901112221.GA2752-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-09-01 12:58             ` Frederic Weisbecker
2011-09-01 12:58           ` Frederic Weisbecker
2011-09-01 12:58           ` Frederic Weisbecker
     [not found]       ` <20110831070313.GA29179-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2011-08-31 13:42         ` Frederic Weisbecker
     [not found]     ` <20110830201030.GC15953-oHC15RC7JGTpAmv0O++HtFaTQe2KTcn/@public.gmane.org>
2011-08-31  7:03       ` Tejun Heo
2011-08-31  7:03     ` Tejun Heo
     [not found]   ` <1314312192-26885-7-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-26  4:20     ` KAMEZAWA Hiroyuki
2011-08-30 20:10     ` Frederic Weisbecker
2011-08-30 20:10   ` Frederic Weisbecker
2011-08-25 22:43 ` Tejun Heo
     [not found] ` <1314312192-26885-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25 22:43   ` [PATCH 1/6] cgroup: subsys->attach_task() should be called after migration Tejun Heo
2011-08-25 22:43   ` [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc() Tejun Heo
2011-08-25 22:43   ` [PATCH 3/6] cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach() Tejun Heo
2011-08-25 22:43   ` [PATCH 4/6] cgroup: don't use subsys->can_attach_task() or ->attach_task() Tejun Heo
2011-08-25 22:43   ` [PATCH 5/6] cgroup, cpuset: don't use ss->pre_attach() Tejun Heo
2011-08-25 22:43   ` [PATCH 6/6] cgroup: kill subsys->can_attach_task(), pre_attach() and attach_task() Tejun Heo
2011-08-25 22:48   ` [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods, take#2 Tejun Heo
2011-08-26  8:05   ` Li Zefan
2011-08-25 22:48 ` Tejun Heo
2011-08-25 22:48 ` Tejun Heo
2011-08-26  8:05 ` Li Zefan
2011-08-26  8:05 ` Li Zefan
2011-08-26 14:09   ` Tejun Heo
2011-08-26 14:56     ` Paul Menage
2011-08-26 14:56     ` Paul Menage
     [not found]     ` <20110826140900.GF2632-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2011-08-26 14:56       ` Paul Menage
2011-08-26 14:09   ` Tejun Heo
     [not found]   ` <4E5753D3.9080500-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-08-26 14:09     ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2011-08-23 22:19 [PATCHSET] cgroup: introduce cgroup_taskset and consolidate subsys methods Tejun Heo
2011-08-23 22:19 ` [PATCH 2/6] cgroup: improve old cgroup handling in cgroup_attach_proc() Tejun Heo
2011-08-23 22:19 ` Tejun Heo
2011-08-25  8:51   ` Paul Menage
     [not found]     ` <CALdu-PAj1ZUmB2ixxA6yeppB8MerBGk1cSeQadobH0H4cRSe7Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:03       ` Tejun Heo
2011-08-25  9:03     ` Tejun Heo
2011-08-25  9:03     ` Tejun Heo
2011-08-25  8:51   ` Paul Menage
     [not found]   ` <1314138000-2049-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-25  8:51     ` Paul Menage
2011-08-25  9:42     ` Paul Menage
2011-08-25  9:42   ` Paul Menage
2011-08-25  9:42   ` Paul Menage
     [not found]     ` <CALdu-PBr-tu1qzScvncr-N4EpPaQ7sTdHf28GhEv_MZLbo1eSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-08-25  9:44       ` Tejun Heo
2011-08-25  9:44     ` Tejun Heo
2011-08-25  9:44     ` Tejun Heo
     [not found] ` <1314138000-2049-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2011-08-23 22:19   ` Tejun Heo

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='20110826131359.096a8131.kamezawa.hiroyu__28633.0732437365$1314332542$gmane$org@jp.fujitsu.com' \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=paul@paulmenage.org \
    --cc=tj@kernel.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.