Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755573AbeAIWyO (ORCPT + 1 other); Tue, 9 Jan 2018 17:54:14 -0500 Received: from mail-pg0-f43.google.com ([74.125.83.43]:44044 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754046AbeAIWyM (ORCPT ); Tue, 9 Jan 2018 17:54:12 -0500 X-Google-Smtp-Source: ACJfBotAmYi24scLTse+gLc+UJXYEzW/5O7TO5Qwpyxl/KBH6eMnGaOPdROtvU7sW+9eNoui0mOosw== Cc: mtk.manpages@gmail.com, Peter Zijlstra , cgroups@vger.kernel.org, lkml , linux-man , "Serge E. Hallyn" , Mike Galbraith , Li Zefan , Ingo Molnar , Paul Turner , kernel-team@fb.com, Andy Lutomirski , Johannes Weiner , Lauro Venancio , Waiman Long Subject: Re: cgroups(7): documenting cgroups v2 thread mode To: Tejun Heo References: <20180109211000.GT3668920@devbig577.frc2.facebook.com> From: "Michael Kerrisk (man-pages)" Message-ID: <5c9ea5dd-12dc-99d6-7905-40fdbc34e6ae@gmail.com> Date: Tue, 9 Jan 2018 23:54:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180109211000.GT3668920@devbig577.frc2.facebook.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/09/2018 10:10 PM, Tejun Heo wrote: > Hello, > > On Tue, Jan 02, 2018 at 07:24:01PM +0100, Michael Kerrisk (man-pages) wrote: >> 2. We write the string "threaded" to each of the domain invalid >> cgroups under y, in order to convert them to the type >> threaded. As a consequence of this step, all threads under >> the threaded root now have the type threaded and the >> threaded subtree is now fully usable. The requirement to >> write "threaded" to each of these cgroups is somewhat cum‐ >> bersome, but allows for possible future extensions to the >> thread-mode model. >> >> ┌─────────────────────────────────────────────────────┐ >> │FIXME │ >> ├─────────────────────────────────────────────────────┤ >> │Re the preceding paragraphs... Are there other rea‐ │ >> │sosn for the (cumbersome) requirement to write │ >> │'threaded' to each of the cgroup.type files in the │ >> │threaded subtrees? Tejun Heo mentioned the follow‐ │ >> │ing: │ >> │ │ >> │ Consistency w/ the cgroups right under the root │ >> │ cgroup. Because they can be both domains and │ >> │ threadroots, we can't switch the children over │ >> │ to thread mode automatically. Doing that for │ >> │ cgroups further down in the hierarchy would be │ >> │ really inconsistent. │ >> │ │ >> │But, it's not clear to me how "Doing that for │ >> │cgroups further down in the hierarchy would be │ >> │really inconsistent", since in the current implemen‐ │ >> │tation, those same thread groups are converted to │ >> │"domain invalid" type. What am I missing? │ >> └─────────────────────────────────────────────────────┘ > > Yeah, I was confused with an earlier varient where we were marking > threaded domains instead of threaded roots. It's mostly about future > extensibility (especially as Waiman was proposing related changes > there) and not doing things automatically / recursively if possible. > > Looks good to me. One more thing. I added the following sentence to the text: The cgroup.threads file is writable only for the cgroups inside a threaded subtree. Can you confirm that that is correct, please. Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/