From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752773AbdGLOAn (ORCPT ); Wed, 12 Jul 2017 10:00:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32092 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbdGLOAm (ORCPT ); Wed, 12 Jul 2017 10:00:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 380A83D972 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=longman@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 380A83D972 Subject: Re: [PATCHSET for-4.13] cgroup: implement cgroup2 thread mode, v2 To: Peter Zijlstra Cc: Tejun Heo , Li Zefan , hannes@cmpxchg.org, mingo@redhat.com, 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 References: <20170612123150.scopfxela7v26dct@hirez.programming.kicks-ass.net> <20170612212753.GN19206@htj.duckdns.org> <20170627070143.GB4114@worktop> <20170630132324.GA18669@htj.duckdns.org> <20170710083200.poevcjo7x47hy5ni@hirez.programming.kicks-ass.net> <8f9c83d7-cadf-3a41-8e56-5828d5abfa26@redhat.com> <20170711121527.imshmmoe4cj7dkig@hirez.programming.kicks-ass.net> <20170711165233.xx6wko4pdxk4rb72@hirez.programming.kicks-ass.net> <0659619a-067d-b542-918c-e468c51feb23@redhat.com> <20170712074555.slefkebvdpfjse34@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: <0f531185-4d39-ff50-8a48-067d6d209673@redhat.com> Date: Wed, 12 Jul 2017 10:00:34 -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: <20170712074555.slefkebvdpfjse34@hirez.programming.kicks-ass.net> 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.30]); Wed, 12 Jul 2017 14:00:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12/2017 03:45 AM, Peter Zijlstra wrote: > On Tue, Jul 11, 2017 at 05:12:39PM -0400, Waiman Long wrote: >> On 07/11/2017 12:52 PM, Peter Zijlstra wrote: >>> On Tue, Jul 11, 2017 at 10:14:42AM -0400, Waiman Long wrote: >>> >>>> The "join" was a special op for the children of cgroup root to join the >>>> root as part of a threaded subtree. The children can instead use the >>>> "enable" option to become a thread root which was the configuration >>>> shown above. This behavior applied only to children of root. Down the >>>> hierarchy, you can't have configuration like: >>>> >>>> R (t=0) >>>> / \ >>>> D (t=1) >>>> / \ >>>> T D (t=1) >>> Why not? >>> >>> First you create: >>> >>> R (t=0) >>> / \ >>> D (t=1) >>> / \ >>> T T (t=1) >>> >>> Then you flip t=0 like: >>> >>> R (t=0) >>> / \ >>> D (t=1) >>> / \ >>> T D (t=0) >>> >>> And then you flip t=1 again: >>> >>> R (t=0) >>> / \ >>> D (t=1) >>> / \ >>> T D (t=1) >> Tejun's thread mode patch has constraints on what operations are allowed >> and what aren't. For a threaded subtree, thread mode cannot be disabled >> in the middle of the tree. > Where in that scenario did I change anything in the middle? All > operations were on a leaf group. What I mean is that you can't disable thread mode if not at the thread root with no children left. Cheers, Longman