From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752482AbdBCU77 (ORCPT ); Fri, 3 Feb 2017 15:59:59 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:33026 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437AbdBCU75 (ORCPT ); Fri, 3 Feb 2017 15:59:57 -0500 Date: Fri, 3 Feb 2017 15:59:55 -0500 From: Tejun Heo To: Peter Zijlstra Cc: lizefan@huawei.com, hannes@cmpxchg.org, mingo@redhat.com, pjt@google.com, luto@amacapital.net, efault@gmx.de, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, lvenanci@redhat.com Subject: Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode Message-ID: <20170203205955.GA9886@mtj.duckdns.org> References: <20170202200632.13992-1-tj@kernel.org> <20170203202048.GD6515@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170203202048.GD6515@twins.programming.kicks-ass.net> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Peter. On Fri, Feb 03, 2017 at 09:20:48PM +0100, Peter Zijlstra wrote: > So my proposal was to do the inverse of what you propose here. Instead > of marking special 'thread' subtrees, explicitly mark resource domains > in the tree. > > So always allow arbitrary hierarchies and allow threads to be assigned > to cgroups, as long as they're all in the same resource domain. > > Controllers that do not support things, fallback to mapping everything > to the nearest resource domain. That sounds counter-intuitive as all controllers can do resource domains and only a subset of them can do thread mode. Also, thread subtrees are necessarily a sub-hierarchy of a resource domain. Also, expanding resource domains from the root after the trees are populated would make the behaviors surprising as the resource domains that these subtrees belong to would change dynamically. In practice, how would this work? To enable memcg, the user has to first create the subtree and then explicitly have to make that a domain and then enable memcg? If so, that would be a completely unnecessary deviation from the current behavior while not achieving any more functionalities, right? It's just flipping the default value the other way around and the default wouldn't be supported by many of the controllers. I can't see how that is a better option. Thanks. -- tejun