[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E9CEFCE.1030003@cn.fujitsu.com>
Date: Tue, 18 Oct 2011 11:17:34 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Frederic Weisbecker <fweisbec@...il.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Ben Blum <bblum@...rew.cmu.edu>,
Frederic Weisbecker <fweisbec@...hat.com>,
Paul Menage <paul@...lmenage.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cgroups: don't cache common ancestor in task counter
subsys
>> @@ -2151,7 +2151,7 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
>> }
>> } else if (retval == -ESRCH) {
>> if (ss->cancel_attach_task)
>> - ss->cancel_attach_task(cgrp, tsk);
>> + ss->cancel_attach_task(cgrp, oldcgrp, tsk);
>> } else {
>> BUG_ON(1);
>> }
>> @@ -2191,7 +2191,8 @@ out_cancel_attach:
>> tsk = flex_array_get_ptr(group, i);
>> if (tsk == failed_task)
>> break;
>> - ss->cancel_attach_task(cgrp, tsk);
>> + ss->cancel_attach_task(cgrp, oldcgrp,
>> + tsk);
>
> When we rollback there, we are dealing with oldcgrp of the last thread
> we have treated. All threads in the rollback list don't necessary belonged
> to that old_cgroup.
>
Good point. I didn't look carefully at this case.
> And we can't try to retrieve these old_cgroup through task_cgroup_from_root() because
> the threads might have exited and thus could be assigned to the init cgroup.
>
> I believe we need to cache these old cgroups in the flex array.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists