From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753027AbcGUPIx (ORCPT ); Thu, 21 Jul 2016 11:08:53 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33714 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751751AbcGUPIv (ORCPT ); Thu, 21 Jul 2016 11:08:51 -0400 Date: Thu, 21 Jul 2016 11:07:40 -0400 From: Tejun Heo To: James Bottomley Cc: Aleksa Sarai , Greg Kroah-Hartman , Li Zefan , Johannes Weiner , "Serge E. Hallyn" , Aditya Kali , Chris Wilson , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Christian Brauner , dev@opencontainers.org Subject: Re: [PATCH v1 3/3] cgroup: relax common ancestor restriction for direct descendants Message-ID: <20160721150740.GF22680@htj.duckdns.org> References: <20160718161816.13040-1-asarai@suse.de> <20160718161816.13040-4-asarai@suse.de> <20160720155147.GG4574@htj.duckdns.org> <6e975d80-4077-fb8b-ec84-708e37c8e149@suse.de> <20160720230228.GA19588@mtj.duckdns.org> <982fcf3a-3685-9bd7-dd95-7bff255c9421@suse.de> <20160720231949.GB19588@mtj.duckdns.org> <379e5b13-29d4-ca75-1935-0a64f3db8d27@suse.de> <20160721145242.GB22680@htj.duckdns.org> <1469113456.2331.16.camel@HansenPartnership.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1469113456.2331.16.camel@HansenPartnership.com> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, James. On Thu, Jul 21, 2016 at 08:04:16AM -0700, James Bottomley wrote: > > I understand what you're trying to achieve but don't think cgroup's > > filesystem interface can accomodate that. To support that level of > > automatic delegation, the API should be providing enough isolation so > > that operations in one domain (user-specific operations) are > > transparent from the other (system-wide administration), which simply > > isn't true for cgroupfs. As a simple example, imagine a process > > being moved to another cgroup racing against the special operations > > you're describing ahead. Both sides are multi-step operations and > > there are no ways of synchronizing against each other from kernel > > side and the outcomes can easily be non-sensical. > > So if I understand, it's not about actually moving the tasks: echoing > the pid to the tasks file is atomic and we can mediate races there. Yeah, each operation is atomic but most meaningul operations are multi-step. > It's about the debris left behind if the admin (or someone with > delegated authority) moves the task to a wholly different cgroup. > > Now we have a cgroup directory in the old cgroup, which the current > task has been removed from, for which the current user has permissions > and could then move the task back to. Is that the essence of the > problem? That'd be one side. The other side is the one moving. Let's say the system admin thing wants to move all processe from A proper to B. It would do that by draining processes from A's procs file into B's and even that is multistep and can race. Thanks. -- tejun