From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754996AbdGXRtd (ORCPT ); Mon, 24 Jul 2017 13:49:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33870 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753878AbdGXRs6 (ORCPT ); Mon, 24 Jul 2017 13:48:58 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 89279C00C108 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=longman@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 89279C00C108 Subject: Re: [PATCH v2 1/4] cgroup: Child cgroup creation not allowed on invalid domain To: Tejun Heo Cc: Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, efault@gmx.de, torvalds@linux-foundation.org, guro@fb.com References: <1500669293-21792-1-git-send-email-longman@redhat.com> <1500669293-21792-2-git-send-email-longman@redhat.com> <20170722134358.GB3329631@devbig577.frc2.facebook.com> From: Waiman Long Organization: Red Hat Message-ID: <0025abb5-8bff-0d17-4050-3a515891933d@redhat.com> Date: Mon, 24 Jul 2017 13:48:51 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170722134358.GB3329631@devbig577.frc2.facebook.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 24 Jul 2017 17:48:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/22/2017 09:43 AM, Tejun Heo wrote: > Hello, Waiman. > > On Fri, Jul 21, 2017 at 04:34:50PM -0400, Waiman Long wrote: >> When thread mode is used, it is possible that some cgroups may be >> in an invalid state. Currently users may not be aware that they are >> invalid until they try to migrate tasks over. This patch disallows >> child cgroup creation on invalid domain. This adds one more failure >> point in reminding users that they are dealing with invalid domains. >> It also minimizes the number of invalid domains outstanding as much >> as possible. > It's a bit inconsistent because we can reach the same forbidden state > by turning a sibling cgroup threaded. Please consider the following. > > A > / \ > B C > \ > D > > Let's say all are domains and we make B threaded. A becomes the > threaded domain, C and D become invalid, which is the configuration > you're trying to prevent. We can either enabling threaded on B too or > relax type modifications further so that people can make C threaded > which makes sense given that that would lead to a topology which has > to supported anyway (if C were threaded before D was created, it'd > look the same). > > So, I'm leaning more towards relaxing restrictions and tightening it, > and given that we have to expose invalid state anyway, I think there's > actual benefit in doing so as it gives more flexibility while building > the hierarchy. Yes, I totally understand that we could have this happened in a sibling node. It is just my idea to make users become more aware that they are dealing with an invalid domain cgroup. It was just a suggestion on my part and I am totally fine if it is not merged. Cheers, Longman