Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbbKPWcn (ORCPT ); Mon, 16 Nov 2015 17:32:43 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:57797 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbbKPWck (ORCPT ); Mon, 16 Nov 2015 17:32:40 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: "Serge E. Hallyn" Cc: Richard Weinberger , Richard Weinberger , LKML , "open list\:ABI\/API" , Linux Containers , LXC development mailing-list , Tejun Heo , cgroups mailinglist , Andrew Morton References: <1447703505-29672-1-git-send-email-serge@hallyn.com> <20151116204606.GA30681@mail.hallyn.com> <564A41AF.4040208@nod.at> <20151116205452.GA30975@mail.hallyn.com> Date: Mon, 16 Nov 2015 16:24:27 -0600 In-Reply-To: <20151116205452.GA30975@mail.hallyn.com> (Serge E. Hallyn's message of "Mon, 16 Nov 2015 14:54:52 -0600") Message-ID: <87y4dxh9b8.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1/dG5Jw5UTKu8HR6iFetfC2QFMTDNYSKFk= X-SA-Exim-Connect-IP: 67.3.201.231 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;"Serge E. Hallyn" X-Spam-Relay-Country: X-Spam-Timing: total 1451 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 4.7 (0.3%), b_tie_ro: 3.2 (0.2%), parse: 1.14 (0.1%), extract_message_metadata: 20 (1.3%), get_uri_detail_list: 3.0 (0.2%), tests_pri_-1000: 6 (0.4%), tests_pri_-950: 1.29 (0.1%), tests_pri_-900: 1.23 (0.1%), tests_pri_-400: 24 (1.7%), check_bayes: 23 (1.6%), b_tokenize: 7 (0.5%), b_tok_get_all: 7 (0.5%), b_comp_prob: 2.2 (0.1%), b_tok_touch_all: 3.3 (0.2%), b_finish: 0.70 (0.0%), tests_pri_0: 321 (22.1%), tests_pri_500: 1067 (73.6%), poll_dns_idle: 1060 (73.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: CGroup Namespaces (v4) X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2686 Lines: 70 "Serge E. Hallyn" writes: > On Mon, Nov 16, 2015 at 09:50:55PM +0100, Richard Weinberger wrote: >> Am 16.11.2015 um 21:46 schrieb Serge E. Hallyn: >> > On Mon, Nov 16, 2015 at 09:41:15PM +0100, Richard Weinberger wrote: >> >> Serge, >> >> >> >> On Mon, Nov 16, 2015 at 8:51 PM, wrote: >> >>> To summarize the semantics: >> >>> >> >>> 1. CLONE_NEWCGROUP re-uses 0x02000000, which was previously CLONE_STOPPED >> >>> >> >>> 2. unsharing a cgroup namespace makes all your current cgroups your new >> >>> cgroup root. >> >>> >> >>> 3. /proc/pid/cgroup always shows cgroup paths relative to the reader's >> >>> cgroup namespce root. A task outside of your cgroup looks like >> >>> >> >>> 8:memory:/../../.. >> >>> >> >>> 4. when a task mounts a cgroupfs, the cgroup which shows up as root depends >> >>> on the mounting task's cgroup namespace. >> >>> >> >>> 5. setns to a cgroup namespace switches your cgroup namespace but not >> >>> your cgroups. >> >>> >> >>> With this, using github.com/hallyn/lxc #2015-11-09/cgns (and >> >>> github.com/hallyn/lxcfs #2015-11-10/cgns) we can start a container in a full >> >>> proper cgroup namespace, avoiding either cgmanager or lxcfs cgroup bind mounts. >> >>> >> >>> This is completely backward compatible and will be completely invisible >> >>> to any existing cgroup users (except for those running inside a cgroup >> >>> namespace and looking at /proc/pid/cgroup of tasks outside their >> >>> namespace.) >> >>> cgroupns-root. >> >> >> >> IIRC one downside of this series was that only the new "sane" cgroup >> >> layout was supported >> >> and hence it was useless for everything which expected the default layout. >> >> Hence, still no systemd for us. :) >> >> >> >> Is this now different? >> > >> > Yes, all hierachies are no supported. >> > >> >> Should read "now"? :-) >> If so, *awesome*! > > D'oh! Yes, now :-) I am glad to see multiple hierarchy support, that is something people can use today. A couple of quick questions before I delve into a review. Does this allow mixing of cgroupfs and cgroupfs2? That is can I: "mount -t cgroupfs" inside a container and "mount -t cgroupfs2" outside a container? and still have reasonable things happen? I suspect the semantics of cgroups prevent this but I am interested to know what happens. Similary have you considered what it required to be able to safely set FS_USERNS_MOUNT? Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/