From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753987AbaKDNqr (ORCPT ); Tue, 4 Nov 2014 08:46:47 -0500 Received: from mail-qc0-f176.google.com ([209.85.216.176]:62743 "EHLO mail-qc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794AbaKDNqm (ORCPT ); Tue, 4 Nov 2014 08:46:42 -0500 Date: Tue, 4 Nov 2014 08:46:33 -0500 From: Tejun Heo To: Aditya Kali Cc: "Eric W. Biederman" , Li Zefan , Serge Hallyn , Andy Lutomirski , cgroups@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linux API , Ingo Molnar , Linux Containers , Rohit Jnagal Subject: Re: [PATCHv2 7/7] cgroup: mount cgroupns-root when inside non-init cgroupns Message-ID: <20141104134633.GA14014@htj.dyndns.org> References: <1414783141-6947-1-git-send-email-adityakali@google.com> <1414783141-6947-8-git-send-email-adityakali@google.com> <87y4rvrakn.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Aditya. On Mon, Nov 03, 2014 at 02:43:47PM -0800, Aditya Kali wrote: > I agree that this is effectively bind-mounting, but doing this in kernel > makes it really convenient for the userspace. The process that sets up the > container doesn't need to care whether it should bind-mount cgroupfs inside > the container or not. The tasks inside the container can mount cgroupfs on > as-needed basis. The root container manager can simply unshare cgroupns and > forget about the internal setup. I think this is useful just for the reason > that it makes life much simpler for userspace. If it's okay to require userland to just do bind mounting, I'd be far happier with that. cgroup mount code is already overcomplicated because of the dynamic matching of supers to mounts when it could just have told userland to use bind mounting. Doesn't the host side have to set up some of the filesystem layouts anyway? Does it really matter that we require the host to set up cgroup hierarchy too? Thanks. -- tejun