From: Li Zefan <lizf@cn.fujitsu.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ben Blum <bblum@andrew.cmu.edu>,
Frederic Weisbecker <fweisbec@redhat.com>,
Paul Menage <paul@paulmenage.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cgroups: don't cache common ancestor in task counter subsys
Date: Tue, 18 Oct 2011 11:17:34 +0800 [thread overview]
Message-ID: <4E9CEFCE.1030003@cn.fujitsu.com> (raw)
In-Reply-To: <20111017172537.GH2829@somewhere>
>> @@ -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.
>
prev parent reply other threads:[~2011-10-18 3:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 7:33 Li Zefan
2011-10-17 17:25 ` Frederic Weisbecker
2011-10-17 17:27 ` Ben Blum
2011-10-27 15:12 ` Frederic Weisbecker
2011-10-31 3:14 ` Li Zefan
2011-10-18 3:17 ` Li Zefan [this message]
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=4E9CEFCE.1030003@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bblum@andrew.cmu.edu \
--cc=fweisbec@gmail.com \
--cc=fweisbec@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paulmenage.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome