From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 479F1C83013 for ; Wed, 2 Dec 2020 08:04:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC7F520C56 for ; Wed, 2 Dec 2020 08:04:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387711AbgLBIEQ (ORCPT ); Wed, 2 Dec 2020 03:04:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387654AbgLBIEP (ORCPT ); Wed, 2 Dec 2020 03:04:15 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65AB4C0613D4 for ; Wed, 2 Dec 2020 00:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=I9YqoBqZdo2yNL9L6VBPasis06QJ+cyQJi6cfgD3c70=; b=M7GckDuPVgHHRIzu8mgLCW78Qg vFCRV0LVEl7pIIENGSO8Z8tP59hGmkRN+gT8/xLR1sYNMmtsm2n6OUruaStL3ghGwFwJgWjRMfO2y 0dJk1S+SrkkE8oTi0lSIShcyt/8WYzyPa0jrS1J3TlenBrzOqcQMQJjA026I8IGEtd4g5knd/oIpV 9vb6x+mulO2OKpoyK1GZwMwI4VgMLipC07UBLDTHL9O/nUm8dlXKj5BAEAH5rDoSF1nVhbYjkeaXR ivQM5NubSMixD97tZLBLyNVdYFg7fodnJcAFi6dMJpdp9Gn13veYKOIS99WeM9uZ4mCANY28chtNL KVPfDOCA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkN5Y-0004CJ-Uc; Wed, 02 Dec 2020 08:02:13 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id C37B0305815; Wed, 2 Dec 2020 09:02:11 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A97512C83017E; Wed, 2 Dec 2020 09:02:11 +0100 (CET) Date: Wed, 2 Dec 2020 09:02:11 +0100 From: Peter Zijlstra To: Josh Don Cc: "Joel Fernandes (Google)" , Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , Thomas Gleixner , linux-kernel , mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, Kees Cook , Greg Kerr , Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, Paul Turner , Steven Rostedt , Patrick Bellasi , benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , Jesse Barnes , chris.hyser@oracle.com, Ben Segall , Hao Luo , Tom Lendacky , Aubrey Li , "Paul E. McKenney" , Tim Chen , Oleg Rombakh , Tejun Heo Subject: Re: [PATCH -tip 26/32] sched: Add a second-level tag for nested CGroup usecase Message-ID: <20201202080211.GD3021@hirez.programming.kicks-ass.net> References: <20201117232003.3580179-1-joel@joelfernandes.org> <20201117232003.3580179-27-joel@joelfernandes.org> <20201125134237.GZ2414@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 01, 2020 at 10:18:00PM -0800, Josh Don wrote: > Hey Peter, > > On Wed, Nov 25, 2020 at 5:43 AM Peter Zijlstra wrote: > > > > Why can't the above work by setting 'tag' (that's a terrible name, why > > does that still live) in CDE? Have the most specific tag live. Same with > > that thread stuff. > > The motivation is to allow an unprivileged user the ability to > configure the trust hierarchy in a way that otherwise wouldn't be > possible for a given cgroup hierarchy. For example given a cookie'd > hierarchy such as: > > A > / | | \ > B C D E > > the user might only want subsets of {B, C, D, E} to share. For > instance, the user might only want {B,C} and {D, E} to share. One way > to solve this would be to allow the user to write the group cookie > directly. However, this interface would need to be restricted to > privileged users, since otherwise the cookie could be configured to > share with any arbitrary cgroup. The purpose of the 'color' field is > to expose a portion of the cookie that can be modified by a > non-privileged user in order to achieve this sharing goal. > > If this doesn't seem like a useful case, I'm happy to drop this patch > from the series to unblock it. Well, the traditional cgroup way of doing that would be to: A / \ T1 T2 / \ B C And tag T1 if you want B,C to share. So me the color thing reads like an end-run around the cgroup hierarchy.