Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934408AbeAHQIy (ORCPT + 1 other); Mon, 8 Jan 2018 11:08:54 -0500 Received: from mail-qt0-f171.google.com ([209.85.216.171]:46096 "EHLO mail-qt0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932633AbeAHQIw (ORCPT ); Mon, 8 Jan 2018 11:08:52 -0500 X-Google-Smtp-Source: ACJfBos0VxAPXF64QbU45oSJ0SzyC+nBu5ND08f1VHB0AzzTW9nX0grQzmLUGDufUvjEE/lK6X9N2Q== Date: Mon, 8 Jan 2018 08:08:46 -0800 From: Tejun Heo To: "Michael Kerrisk (man-pages)" Cc: Peter Zijlstra , longman@redhat.com, lkml , linux-man , "open list:CONTROL GROUP (CGROUP)" Subject: Re: Cgroups v2 thread mode "domain invalid" state Message-ID: <20180108160846.GV3668920@devbig577.frc2.facebook.com> References: <20171222001554.GH1084507@devbig577.frc2.facebook.com> 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hello, Michael. On Fri, Dec 22, 2017 at 10:11:00AM +0100, Michael Kerrisk (man-pages) wrote: > I don't get the above. I mean, if we have the following hierarchy, > where R is the cgoup v2 mount point: You're right, I'm probably confused with an earlier variant. I might still be forgetting something in this area. I'll ping back if I can recall something. > > * Possible extension to threadmode. If we figure out how to do mixed > > mode further down in the hierarchy (and if there are actual use > > cases which require that), automatically switching would be really > > confusing. > > > > The invalid state while not the most convenient is straight forward > > (only the operations which are explicitly asked are performed) and > > keeps the door open for future changes. > > The "allowing for future" extensions idea makes some sense to me. > > One other point that occurred to me after I wrote my email yesterday > was that if the threaded root reverts from being "domain threaded" to > "domain" (because it no longer has "threaded" children AND either it > has no member processes or it has no threaded controllers enabled), > then the "domain invalid" descendants revert to type "domain". I'm not > sure whether that detail also provides some rationale as to why all > descendants of the threaded root cgroup aren't automatically converted > to type "threaded". Any thoughts about that? Currently, thread mode implementation doesn't allow reverting back to domain. The problem there is that it's impossible to tell which portions of the domain consumptions that are accounted to the threaded domain (the parent of threaded subtree) belong to the cgroup which is trying to revert to domain. But assuming we in the future allow reverting back to domain, scenarios similar to what you suggested can become problematic. All operations always behaving recursively will probably be the only sane solution but that blocks some possibilities for future changes. Thanks. -- tejun