lkml.org 
[lkml]   [2011]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 06/10] cgroup: improve old cgroup handling in cgroup_attach_proc()
    On Tue, Nov 01, 2011 at 04:46:29PM -0700, Tejun Heo 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>
    > Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    > Cc: Li Zefan <lizf@cn.fujitsu.com>

    Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>


    \
     
     \ /
      Last update: 2011-11-14 21:41    [W:0.020 / U:57.572 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site