Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3656536ima; Tue, 23 Oct 2018 09:10:53 -0700 (PDT) X-Google-Smtp-Source: ACcGV63kybVGphoNxxgcSWswvoL4tGkqeJsxez6hC+pjgqls3moMCeUn4Xy44MEaCzhmTbT5EI1z X-Received: by 2002:a63:9343:: with SMTP id w3-v6mr46489486pgm.343.1540311053149; Tue, 23 Oct 2018 09:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540311053; cv=none; d=google.com; s=arc-20160816; b=bbvR+aqtnEpkKd6IG7Z9OiV0iF+6EMi2iCwlfKUlBojn56/bBr1syPv2tFmK0N7lHH iobhWPXUJAeCI+w47k3uf4nB9gxyOeNKSmuodnsEWZTrPtbgC5KDSgUijczotpS2aYS8 E5MMqe4a1W6dwb7NPkUPiCNoPNoYkA6Py3sqJUm1tW/+l5U3nK10L2KJGuUZXtLt80hb K6jx8AplCGjcrC8upfglGDsLQbuBlvto/8wpLNvPaLyvXZm01mSQj+DXJk9YcYCn7Iat DYdpdznpQ7lDQ2XX0sAMaExl0iVFbAm6IRtQn5uabyGhhaMybV0Hi9+/jgCWv2YERK7E Ojow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=Fgm4tFmb3aCVBUqVRe/lYD1am1ANjqT3rkKG73BHrA0=; b=Pjjt1cTKvXWJ6wbwdc09bVbneDUE2CIXS6lv7T1QaXMvC/HqT9Kldie4KLqfQbYpiH Dmr4czp6BYLV9OIsuWtIK6XEeDyEPhBSLzkjqplrgjBANSygY3ZPXS6dIZQ1MEK1+xN/ lb7oEKTC76LyLXMKB8ODwKdx+j9mo0cb3FYncY3VhA3HgTPSZ3SWwJtloP4Mki+UjdwD KFPs/+CLrpDpneg8Dscp9h5ZSixZ75ixMdPQaSieQXL2TMuOmrPgKxs//QCQLJ5Qs34Y 7DfI7kj6rD+4LGNbwxX2vwhkEJPmPAmEAX0y+ufgXJNmw1jeAqhy0i8DP//os1c9Ur4q ZDSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZqKtQQot; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16-v6si1510985pll.325.2018.10.23.09.10.36; Tue, 23 Oct 2018 09:10:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZqKtQQot; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728150AbeJXAdS (ORCPT + 99 others); Tue, 23 Oct 2018 20:33:18 -0400 Received: from mail-ed1-f44.google.com ([209.85.208.44]:39940 "EHLO mail-ed1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbeJXAdS (ORCPT ); Tue, 23 Oct 2018 20:33:18 -0400 Received: by mail-ed1-f44.google.com with SMTP id r1-v6so2167114edd.7; Tue, 23 Oct 2018 09:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=Fgm4tFmb3aCVBUqVRe/lYD1am1ANjqT3rkKG73BHrA0=; b=ZqKtQQotqtvSi/BvgAxSrFvgRLYJqUDOhA0kxHrEufBXnxNntz5BcbEzjTuayF1q7a 0ysmOTlaBB+WHtnpemnIlA/t4rb5kqzUEHJKk8CNYvwvzcCKhGTFPlmpi7sx84OdpqwC 8Fpj9q7UjGZ/wYOAuDU9+6mJbyiLfEuTMUjmIZl6oa/KzgyoVhV0KXZfEXwxBk9qRxva 2nvc5uYKDSHXh7VZgFQnqdkjztLS1KwAd3u+xOoLi8XEiuibW+jHKfdffMlOJ2mAqS3k poLVZH36Cf8KMyHe0E0lQX+sMTVMvywClNw5s+LZUK1BP1hGZV03qVj6QhIr7CPb8nLh AnYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Fgm4tFmb3aCVBUqVRe/lYD1am1ANjqT3rkKG73BHrA0=; b=nEOH4P8eHIV41o/Vs54+uOJwBzlMBcCBXWTOcRLpftHMY4XatDz6oHrheoiYsAhXWR 7oesevhLc29XFwCPJ9vCmULAGLc21DJdW2ZbZKK3rEG3z20Q1ShLbZMMGXjqblj0gxcY QnOZMfSPNGTaYjbsY616B+drPcLvLkUUkyc6S4WpBKZufFL1hpmDR7F+jAwQm3lAJYEb n9UNTxd+gtEhwriro97j0nWu6rawJA7pKZ5RpMlbJr1WQsMJ4XYj34RAsod6V24LMNzy BMVX1/rIL4YaFYM+ROB5cJ3cpaCCj7HZtm5cQZwwSWNw34Na1TKR6m6tA+iQSMve6jdo ksGg== X-Gm-Message-State: AGRZ1gKshCgNcit6BeEFAOe3bvyfyBsHl4UtbNTRh7aoUFhbwyLXqcSZ iB1L70xEEFlSFHrqIPzIJE+B7bAA2/hUw9suW0M= X-Received: by 2002:a05:6402:12c8:: with SMTP id k8mr9185770edx.143.1540310956010; Tue, 23 Oct 2018 09:09:16 -0700 (PDT) MIME-Version: 1.0 References: <20181017161958.GT270328@devbig004.ftw2.facebook.com> In-Reply-To: <20181017161958.GT270328@devbig004.ftw2.facebook.com> Reply-To: mtk.manpages@gmail.com From: "Michael Kerrisk (man-pages)" Date: Tue, 23 Oct 2018 18:09:05 +0200 Message-ID: Subject: Re: Cgroup v2 thread mode oddity: "domain invalid" cgroup with threaded controller enabled To: Tejun Heo Cc: "open list:CONTROL GROUP (CGROUP)" , "Serge E. Hallyn" , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tejun On Wed, 17 Oct 2018 at 18:20, Tejun Heo wrote: > > Hello, Michael. > > Sorry about the delay. > > On Thu, Oct 04, 2018 at 09:40:57PM +0200, Michael Kerrisk (man-pages) wrote: > > This seems odd. x/y is now of "domain invalid" type with a controller > > enabled! This feels like a violation of the rules, since we can't > > in other circumstances do anything with a "domain invalid" cgroup > > except convert it to "threaded". In particular, we can't create > > child cgroups under a "domain invalid" cgroup, or add member processes > > to the cgroup, or *enable controllers in the cgroup*. In fact, when > > doing the > > > > # echo threaded > x/z/cgroup.type > > > > I had expected a write(2) error because the state of x/y should > > (I thought) not be permitted. > > So, both the interim (before turning x/z into threaded) and final > (after) are completely fine - the cgroups are empty and whether > threaded controllers like pids are enabled or not don't really change > things that much. > > Maybe it is a bit inconsistent to then deny enabling threaded > controllers on invalid domain cgroups. We can lift that restriction > but I personally can't see why that'd be clearly better. So, I also can't see anything that seems harmful in the scenario I described; it's just an odd inconsistency, and I supposed it was unintended/overlooked behavior, and I wanted to alert you to it, in case it seemed problematic. However, as long as you have no concerns, I see no reason to change the existing behavior. Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/