Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5300168imm; Tue, 16 Oct 2018 08:12:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV62CbkFVhRhH7SbkEC+t/xuurIP180KoAGBBhIeMpLmxrHVA4C/LwtIeWU7u580NBDOa58id X-Received: by 2002:a17:902:1a7:: with SMTP id b36-v6mr13511805plb.240.1539702760802; Tue, 16 Oct 2018 08:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539702760; cv=none; d=google.com; s=arc-20160816; b=Qn5BJmsqQG5N4GXcy5UtthCU84fYZzr5a7WdOteG5WcXOexsEx49CLGtzQORNsN61H 6s2WbM6pSYU8gwU2p1ZhrsQCAlT4ugnC9oiTodXVwsxrb6x1OpNCwLjMZyeR6dAU9VRW 6BJXiLti4XOF+tjZxwRGpq/6Ps429qOmBMXoKxcGyRRLGcOB6KE/Rd8k76tr6NVsVD9f /4M0bMV0RJkpQeHSpZlpemOp5n52XJAtkmJTzT5r9RlLl5v1sK28VB85UJPeCiDi8ODK wH21LNz0dUi+W/4IcwdeJqFhM4hFadepe+2UCneSLtYXHnFhYMSPaNkPregQ/0GLWuLy 84XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:dkim-signature; bh=os7yITSbdycw4FtWMHMzor8Qmp5i56pB04eEadWuHqU=; b=O5xWNqBZQTCGM83gXvyn1jiiKOGT7i+pyb6WwjaiqWvLgw90EfcIWSjvCXE6E/45IK 2fj4IE/qPA2y+Ja7yIsbRZLDf00P4LuEHMIxPGTyqmYdMolnveXETNnYkDzCSkJoQmlU tmsIhnTJ9rGHyPhsN15ZwMTP9O9JUOSmG+P/xIFRCWLHEq6mkDY5YSg9CgWwvwXaFT3T dRr4KkryPkhRlfteBzZt6Za4EXc2mbVHdeiLZxvDme5UzW14FzxE5DbkUAxtVFQfRdcH /xDbwyB8g4h7vpdqh6VchMBzVbYSfB8qij092MoIDtd3eZPyVgzBRqzP4WDfWYyzhpC2 EitA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W0EqXhLB; 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 l64-v6si14686023pge.169.2018.10.16.08.12.24; Tue, 16 Oct 2018 08:12:40 -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=W0EqXhLB; 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 S1727640AbeJPXCk (ORCPT + 99 others); Tue, 16 Oct 2018 19:02:40 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:46021 "EHLO mail-wr1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727165AbeJPXCj (ORCPT ); Tue, 16 Oct 2018 19:02:39 -0400 Received: by mail-wr1-f46.google.com with SMTP id q5-v6so25994749wrw.12; Tue, 16 Oct 2018 08:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=os7yITSbdycw4FtWMHMzor8Qmp5i56pB04eEadWuHqU=; b=W0EqXhLB0O8NfTAI56CTyGQo2nXO/MuXHjyGjjVa4atNkh2WNnfrvIktaqcsS3R+tX qHyFaE/vKdzkdHBVf05HUR/WUWlm9Gkb6FnGIIBYlf6gUEBJ/eJn3ngQvrMTxUYnDHaQ eP7WYWwLtZViLQRf4nT0gykc4pJZFfJBlN6Ef94qlIoHDfg2IIRSSenW0WN+WPjx07tN EpajyGMxB8qSaIdWBZOxGYI85QCyXodeCcbJDKgXFzmDRnQNFKZbi2U/gTDjTk8HFIrf /xwRob8emC3hTAlSP3HT66AIjDMbkfnzx0vU4pNjI82b6ZQulc8rRTLpjGLXPDMctXO0 meGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=os7yITSbdycw4FtWMHMzor8Qmp5i56pB04eEadWuHqU=; b=tNKMD0MrD1ycGHkOxKF57zA56e9aVfiJbLIdaNnj/aSn+wPyAzxjf4P1EMbb7fQbf2 ZcENtzRBQF1wuH3x2OHp+TicCXMNSh/9Dhe3ksMRIsSEnsJDkK9Z+9uELzR4PmK00xcF ahIbCrNaW4jYZxzZPd5EEuaAUZEWoelbq7V6OnNEZcMvC6RtYaSHaPPXA/du0YKE2WMo Il1WnR3Nath1Er7BeFu3a9A+BGsS5JFHFIFsKH/QoFVIfSOoGY5hVjWR/uow79OIYnrH Y7a/y14w2eszMmqkvY491iIhLOKHp7oFg4ugH7jcyJDJvxwYsFjj12Xt/WvjY48Eu84h ACXw== X-Gm-Message-State: ABuFfojBArYociCITSaMH0gmD6gkdko+Q9TW3Aka2EzwyA6DpTje1A7C AuNAXUI8oQT2/2uHS+YA82JiVSwV X-Received: by 2002:a5d:4208:: with SMTP id n8-v6mr17910826wrq.260.1539702703638; Tue, 16 Oct 2018 08:11:43 -0700 (PDT) Received: from [10.0.20.135] (mail.jambit.com. [95.157.63.22]) by smtp.gmail.com with ESMTPSA id k25-v6sm25540439wre.18.2018.10.16.08.11.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 08:11:42 -0700 (PDT) Cc: mtk.manpages@gmail.com, "open list:CONTROL GROUP (CGROUP)" , "Serge E. Hallyn" , lkml Subject: Re: Cgroup v2 thread mode oddity: "domain invalid" cgroup with threaded controller enabled To: Tejun Heo References: From: "Michael Kerrisk (man-pages)" Message-ID: <4fd48929-69fa-f13b-0095-1d210068684d@gmail.com> Date: Tue, 16 Oct 2018 17:11:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Tejun, A ping on the below... Thanks, Michael On 10/04/2018 09:40 PM, Michael Kerrisk (man-pages) wrote: > Hello Tejun, > > Suppose we have the following scenario: > > x [d] (pids) > y [dt] (pids) > p [t] > q [t] > r [t] > z [d] > > Here, x/y is a "domain threaded root" with a threaded controller > (the 'pids' controller) enabled. (In this scenario, there are no > member processes in any of the cgroups.) > > Suppose we now convert x/z to "threaded" type: > > # echo threaded > x/z/cgroup.type > > Now we end up in the following state: > > x [dt] (pids) > y [inv] (pids) > p [t] > q [t] > r [t] > z [t] > > 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. > > Your thoughts? > > Thanks, > > Michael > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/