From: Tejun Heo Subject: Re: [PATCHSET cgroup/for-3.8] cpuset: decouple cpuset locking from cgroup core Date: Thu, 29 Nov 2012 06:36:50 -0800 Message-ID: <20121129143650.GE24683@htj.dyndns.org> References: <1354138460-19286-1-git-send-email-tj@kernel.org> <50B743A1.4040405@parallels.com> <20121129142646.GD24683@htj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ELfdbRPZ1kHUxkq+vs4wNrWZGG+uvJzviHhivW4y/S4=; b=JTDJhw8ZBMujUQoFNUqUhjTTeLTmgwxfJ2WPEwhtyg9NprUqD46gexE3coZGQcYOvx 6mNoRPqxapKAW42t1tMDftFQwCYIy9uMllKhJ6RQHTuPc0AjcMGH9oWuoI81eq9mOB2b 02MhGCXFxP8eTXVveI3dm3HZaAiBxGhBj/gTq96npyRyGDwsGr9Yua51ScJCWCWtyxfl GmJMYx/3UgplpzWuqShcVvRZSfzBDHf7K9ODy9eJzHUUdYruOaHLGetQ4KMe8vILndQR usd0/Bv5RAS4+WGNSJvsXMtjPhxJPte8DdR3cwhP8YiDjqtzDv+1ff2iqXuGFFp0r/Gn 8qVw== Content-Disposition: inline In-Reply-To: <20121129142646.GD24683-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Glauber Costa Cc: paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mhocko-AlSwsSmVLrQ@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org On Thu, Nov 29, 2012 at 06:26:46AM -0800, Tejun Heo wrote: > > What I'll try to do, is to come with another specialized lock in cgroup > > just for this case. So after taking the cgroup lock, we would also take > > an extra lock if we are adding another entry - be it task or children - > > to the cgroup. > > No, please don't do that. Just don't invoke cgroup operation inside > any subsystem lock. To add a bit, you won't be solving any problem by adding more locks here. cpuset wants to initiate task cgroup migration. It doesn't matter how many locks cgroup uses internally. You'll have to grab them all anyway to do that. It's not a problem caused by granularity of cgroup_lock at all, so there just isn't any logic in dividing locks for this. So, again, please don't go that direction. What we need to do is isolating subsystem locking and implementation from cgroup internals, not complicating cgroup internals even more, and now we have good enoug API to achieve such isolation. Thanks. -- tejun