Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp859765imm; Wed, 17 Oct 2018 09:21:10 -0700 (PDT) X-Google-Smtp-Source: ACcGV60LuPd6tq2WvlIZJQN3JcBrrs1mrVw8bp3amctX3ckzeJbQC3Hrr1fUmpe/H+ovD73xYi1U X-Received: by 2002:a62:9402:: with SMTP id m2-v6mr27182960pfe.255.1539793270369; Wed, 17 Oct 2018 09:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539793270; cv=none; d=google.com; s=arc-20160816; b=06UqvsgrF7Mx+NxRkGCQww/wcHycjNFgHzrc7KkdIhHnUjzvIiigy+ZbzW8lkLJlp7 YepdsqDBfT5dTHwHZ5Rq+SJXtw5QpWcl5dhXS4cyoVOSL2Wx0VQUePaptcE5ti2oUstL 8qHEed8C2O/3jexDWvmTScHKMc6bpbJ0lrlNwyspDdRoq1ex7BopIfcceF/ilmucUrcu wNDRUpvlU/j99O/WT7pyECcbeXGZqg5Lr9ANIyS7DRsvmcpK12pcZlW3MP1D6crb/KW6 ft6gXlT+53n4gRV3XUlnplnidDFZ3P7rIufSc6r6+/QsD46Q0I9iPBQTG3a9EANGKV4j 6oQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tASjEjfws3/XHl7yNeAIkgDk0U2NJ7AFE81cCChSL6E=; b=j5BHtilcxqy877jjgt5sGwdUHXeSaaQKNimNe4tZvPI4aTlS/Xs5n6SQDUhPw0CdeF yZGkvwcj0ZQdbEgCo/TZKlv9RB80K49oJU7aYvF6KnmP/xF1Av5QlVXhj0/Cf3FN7bg9 Ee0EykcEs60CMvjq7xu4JwTtDvgGn8ODtIxMa3UN+J5JqO5TxPS9KOUYaN659cvLgjoB QDf+lZggOo1uf5ziEys/mlOSUUbL4sWXR7VXCTBnSAllEItyLAnkxddOicbVH8xnMw3l wcF7hLybgKTnHd1Oq6JmJiw8aFGBxPNWFnia5uDFK9ARIBXR5CktbfVd87lcYXOxqJK+ QZcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Y5FBr9V5; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o125-v6si14218679pgo.302.2018.10.17.09.20.54; Wed, 17 Oct 2018 09:21:10 -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=fail header.i=@gmail.com header.s=20161025 header.b=Y5FBr9V5; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727806AbeJRAQ2 (ORCPT + 99 others); Wed, 17 Oct 2018 20:16:28 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:35151 "EHLO mail-qk1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727191AbeJRAQ2 (ORCPT ); Wed, 17 Oct 2018 20:16:28 -0400 Received: by mail-qk1-f181.google.com with SMTP id v68-v6so16846252qka.2; Wed, 17 Oct 2018 09:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tASjEjfws3/XHl7yNeAIkgDk0U2NJ7AFE81cCChSL6E=; b=Y5FBr9V5kqJXG6zjHU7WZnmah4mhzBAjmOjq4fBTz40SQLAArQNoX8ddthirR5Szw+ K/9RHEEx7wjVKNIovY3EyMwGiMn4t5r7aog9pAUShzYCVJljSIPHmYbhf/a7+3oU/r8i 3HcYH/H2DLOBUy8uNcPqJXDgRWRc9CgOQq4b6JMV9K2CEiyJ4vzmU8lV0J6YvLCKlxom ZV3pOqbUe81cYw7K8rLEV4SDcNCs82mGhNCrrGZqAfUJW6XzO1gT9dT/oXyfRyT2aFDY 6aPaSED7mtXLMfbEiPl+Nknsdp9WxxcKiVV6/p8LyKroJzdasbOWjViybDoT2kwfdVBz RkjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=tASjEjfws3/XHl7yNeAIkgDk0U2NJ7AFE81cCChSL6E=; b=Hkutw5eXHxF3qk0IrkIl5+DOwc2pbxTm3zi3KplWllHxXKKM1nUv3Hf0rusT+iuYKV giAuTe0fVnUWeQk5uAVCwX15b8f60OGRGO90OscJzagyN8R5r+j5ouwksUNlaaD8sUi3 OtopD2u9SwHWT+K4TL0SMZ0KfQ0y4bU8mrAiQixqVdV6xMOQKEU2TUyNccqbrT3YeSAs 7iAl5eK9mMWJ3D3YOM9bvl1XKKlrmvy1jpklVE25/VBr27l88StowxWTd3muVcnzYzCN NZTPkds8PpnIsk7mgbLys/mdtE+O0yzP9dwR2ctg5TUhuafHRd0Qv6RF1xQEznnZvSuu 6/KA== X-Gm-Message-State: ABuFfojbqK4+iy/hNq4V2w8WhdlLO2DqWpc3DVk7qYrT9R72fS3NyBGN Fyx1jCpuge/mgD5WlYLGy2w= X-Received: by 2002:a37:2442:: with SMTP id w63-v6mr23537464qkg.31.1539793201076; Wed, 17 Oct 2018 09:20:01 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::5:5411]) by smtp.gmail.com with ESMTPSA id s131-v6sm9230294qke.57.2018.10.17.09.20.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 09:20:00 -0700 (PDT) Date: Wed, 17 Oct 2018 09:19:58 -0700 From: Tejun Heo To: "Michael Kerrisk (man-pages)" Cc: "open list:CONTROL GROUP (CGROUP)" , "Serge E. Hallyn" , lkml Subject: Re: Cgroup v2 thread mode oddity: "domain invalid" cgroup with threaded controller enabled Message-ID: <20181017161958.GT270328@devbig004.ftw2.facebook.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks. -- tejun