Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp682047pxu; Wed, 2 Dec 2020 00:06:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxj+aEzBfQLnpjzmC7xBmr7RQHhVS1+NvL3/Ot4Fw34dYEtt8CCLGTgKMs0VD/4UCZpeaXT X-Received: by 2002:a17:906:e086:: with SMTP id gh6mr1145431ejb.95.1606896411114; Wed, 02 Dec 2020 00:06:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606896411; cv=none; d=google.com; s=arc-20160816; b=lt1VOgX+RgbNpvdAI+7KaD1EwzdQ/yNo0k9Y6wkC7tPk2F3HLHlvxR0z/jYR9qK2aY Ue5x1rWxEnOQ+sGbAzxP0Ug5tQKj//S/Z9a0EkytuNxei/FZLmm51AdUVnQvFu/wTzvD ovfm3MzadusyLAKhaVXdseXYAD1EB9L81oxrpfzn5v0slOaC6jUjUYbl+ekhdSUsZxYE eWyvddkNTNTFOG7xCufDlKTCX3iMV9ZxF/nO2/09OzguQRcNQLg76un89497jrZlmsQo bhNpYVBv0DC2+b0bkHR126607tI81XYvG5MS+T4f1fV6+PCNOcKClXxh++EnplGKp4Zp Asug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I9YqoBqZdo2yNL9L6VBPasis06QJ+cyQJi6cfgD3c70=; b=bYPbKFPfpVjwWq7XTTj5X1akitrmptCWuR/jfEXJJAHF0G2ig/kypjWqQAf2jS2ltU j2F8+bkecVO3LPwrbmPEh9qhZ0T71KTWt64CAy1/hLX7YP/+K+ecKF4AUnaOcwSc3cIy Bp5KDSSvtYSa7ozOMuL260HUolRc2qxF76T3EKJsysfpIh3Zi5sT+nZawBWMbwDxwgx7 HkPLzU+hd8tAB9KtYS5QfkfFFA1MPAB94s5tZwYh9ZZpTyi0tnSqGvNFXyqdWhE5CHMZ D5eTmkucNC2+djXVqYdnl7SlAeF+HRodN7bwj95jNfOlTSsqVNV68m4ibdfP5CdJPXEU hl6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=M7GckDuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si553034edc.537.2020.12.02.00.06.26; Wed, 02 Dec 2020 00:06:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=M7GckDuP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387702AbgLBIEQ (ORCPT + 99 others); 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.