From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198AbcGUSQw (ORCPT ); Thu, 21 Jul 2016 14:16:52 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:46522 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751510AbcGUSQp (ORCPT ); Thu, 21 Jul 2016 14:16:45 -0400 Message-ID: <1469125002.2331.54.camel@HansenPartnership.com> Subject: Re: [PATCH v1 3/3] cgroup: relax common ancestor restriction for direct descendants From: James Bottomley To: Tejun Heo 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 Date: Thu, 21 Jul 2016 11:16:42 -0700 In-Reply-To: <20160721155046.GB23759@htj.duckdns.org> References: <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> <20160721150740.GF22680@htj.duckdns.org> <1469114194.2331.20.camel@HansenPartnership.com> <20160721152648.GA23759@htj.duckdns.org> <1469115276.2331.23.camel@HansenPartnership.com> <20160721155046.GB23759@htj.duckdns.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-07-21 at 11:50 -0400, Tejun Heo wrote: > Hello, James. > > On Thu, Jul 21, 2016 at 08:34:36AM -0700, James Bottomley wrote: > > So if I as the cgroup ns owner am moving a task from A to A_subdir, > > the admin scanning tasks in all of A may miss this task in motion > > because all the tasks files can't be scanned atomically? > > So, the admin just wants to move processes from A and only A to B. > It doesn't wanna interfere with processes in the subdirs or on-going > ns operations, but if the race occurs, both A -> B migration and ns > subdir operation would succeed and the end result would be something > neither expects. OK so a theoretical (not saying it's implementable, we'll have to explore that) way of fixing all of this is to have separate views of the tree. If the admin always saw everything in A, even if the cgroupns had created subdirectories in its own namespace. That way there'd be no race ever in the admin's view (because it's the view they created and would expect to see). All sub cgroup activity would only be visible to tasks in the new cgroupns (we'd probably have to have them make this visible by mounting a new cgroup tree). James