linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Li Zefan <lizefan@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	akpm@linux-foundation.org, mhocko@suse.cz,
	kamezawa.hiroyu@jp.fujitsu.com, liwanp@linux.vnet.ibm.com,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
	glommer@parallels.com
Subject: Re: [PATCH] cgroup: Don't drop the cgroup_mutex in cgroup_rmdir
Date: Mon, 30 Jul 2012 11:25:13 -0700	[thread overview]
Message-ID: <20120730182513.GC20067@google.com> (raw)
In-Reply-To: <501231F0.8050505@huawei.com>

Hello,

On Fri, Jul 27, 2012 at 02:15:12PM +0800, Li Zefan wrote:
> The cgroup core was extracted from cpuset, so they are deeply tangled.
> 
> There are several issues to resolve with regard to removing cgroup lock from cpuset.
> 
> - there are places that the cgroup hierarchy is travelled. This should be
> easy, as cpuset can be made to maintain its hierarchy.

Or we can expose limited interface for traversal while protecting
hierarchy itself with smaller lock or make the hierarchy safe to
traverse with RCU read lock.

> - cpuset disallows clearing cpuset.mems/cpuset.cpus if the cgroup is not empty,
> which can be guaranteed only by cgroup lock.
>
> - cpuset disallows a task be attached to a cgroup with empty cpuset.mems/cpuset.cpus,
> which again can be guarantted only by cgroup lock.

Why can't callbacks enforce the above two?  We can keep track of the
number of tasks in the cgroup and reject operations as necessary.
What's missing?

> - cpuset may move tasks from a cgroup to another cgroup (Glauber mentioned this).

No idea about this one.  Why / how does this happen?

Thanks.

-- 
tejun

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

  reply	other threads:[~2012-07-30 18:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120718212637.133475C0050@hpza9.eem.corp.google.com>
2012-07-19 11:39 ` + hugetlb-cgroup-simplify-pre_destroy-callback.patch added to -mm tree Michal Hocko
2012-07-19 12:21   ` Aneesh Kumar K.V
2012-07-19 12:38     ` Michal Hocko
2012-07-19 13:48       ` Aneesh Kumar K.V
2012-07-19 14:09         ` [PATCH] cgroup: Don't drop the cgroup_mutex in cgroup_rmdir Aneesh Kumar K.V
2012-07-19 16:50           ` Tejun Heo
2012-07-20 15:45             ` Peter Zijlstra
2012-07-20 20:05               ` Tejun Heo
2012-07-20 22:07                 ` Glauber Costa
2012-07-27  6:15                 ` Li Zefan
2012-07-30 18:25                   ` Tejun Heo [this message]
2012-07-20  7:51           ` Michal Hocko
2012-07-20 19:49           ` Tejun Heo
2012-07-20  1:05         ` + hugetlb-cgroup-simplify-pre_destroy-callback.patch added to -mm tree Kamezawa Hiroyuki
2012-07-20  1:20           ` Kamezawa Hiroyuki
2012-07-20  8:01             ` Michal Hocko
2012-07-20  8:08               ` Kamezawa Hiroyuki
2012-07-20  8:06         ` Michal Hocko
2012-07-20 19:18           ` Aneesh Kumar K.V
2012-07-20 19:56             ` Tejun Heo
2012-07-21  2:14               ` Kamezawa Hiroyuki
2012-07-21  2:46                 ` Tejun Heo
2012-07-21  4:05                   ` Kamezawa Hiroyuki
2012-07-22 17:34                     ` 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=20120730182513.GC20067@google.com \
    --to=htejun@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cgroups@vger.kernel.org \
    --cc=glommer@parallels.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=liwanp@linux.vnet.ibm.com \
    --cc=lizefan@huawei.com \
    --cc=mhocko@suse.cz \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).