Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp631340pxu; Tue, 1 Dec 2020 22:22:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGLt708wLLasJZiI2KBx7BU2AJQYA97cQr6VGZHhPNipG+PuelMP4D0FvO0nvW+iTWNlpt X-Received: by 2002:a17:906:1481:: with SMTP id x1mr903632ejc.186.1606890138877; Tue, 01 Dec 2020 22:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606890138; cv=none; d=google.com; s=arc-20160816; b=sjlaXMt/KvHCRhAIh/j7tOzsHuJi+5CSl11Jt+a8xphxGHnI6xb4wo7jfvajM1YNrK 8reCGcw1KloV/AuFavGv4Bctsl2C1v9+pKyb/Do3J7DUW7RB3+xERnDKJkNP9xLo+ib0 UtYRSiul/Qp8a3qZQ63PD5FYW1i7ggJwi4g/6mtqg1l0YqCnTl/3QiszcwEKaNyvURNJ X304SeI8mX5McS/Y/LlNd893cWhlf4O3y2w27Di8HJurUZisB3ZqLTpXITPJ5fAL3Gjg WarFp9LX9nyqo0oJ43wB15O2xkMLYE4nB07cGa9mgYXm6FmIKPYq1Ii4JA+ka5Z4ijsN oMEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=caKzWOB4UBzcA6CKNvNm8KcbJgri/lMEEKGcvT6J+cU=; b=QlN+Jbd7C1wqCa0YFkz4xP4A2zvHqCMJZn1YQv9Nl9elpMQBLZ3HkzfPSL3MbxK83J 1OQ61bqQdxV5Lm8jbQ3q4jow6xeJDhba+Kqi+JLjjtYSUHMnSTpdK1IaXL8C62K3QIL3 C/4lp/NXriW1IKrYAXsIGAZfGF7+RhkxTzip9eI7HhAiM2Bas0uBITmdUGTFio1ABl+9 vmfIJWmRPJ5B4gBCGJM/B7I1D/JDxT874rmNX6tB0qUrVDytZgEchzVv7p76DaUBwFkt kedkf9PUrhQ8YdjzmLfGOfnA3XNQr2AzCPiDr0hyYUMPSN+zQjpYo2GFeNm9sC4BHhts iqOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="NZDxE/zJ"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si480309edn.43.2020.12.01.22.21.56; Tue, 01 Dec 2020 22:22:18 -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=@google.com header.s=20161025 header.b="NZDxE/zJ"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728615AbgLBGSx (ORCPT + 99 others); Wed, 2 Dec 2020 01:18:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbgLBGSx (ORCPT ); Wed, 2 Dec 2020 01:18:53 -0500 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A773BC0613D6 for ; Tue, 1 Dec 2020 22:18:12 -0800 (PST) Received: by mail-qk1-x731.google.com with SMTP id n132so333346qke.1 for ; Tue, 01 Dec 2020 22:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=caKzWOB4UBzcA6CKNvNm8KcbJgri/lMEEKGcvT6J+cU=; b=NZDxE/zJXnE59tyT2130Bk4awx3THHf4DR4Qmk1ZlVOKWiKxmX57gm2jSjy2Y5MQdg sdnR2DVhVEDWQap83DvkYK38iONX99gnd0E8F2gL74LJYt/8tlO260UFzqSv9Ku0ai6Z Q7BKMG5jRvRW7OHiWHaKgVx4DTXNrq7DXwu3M+xY1LP29mXgC1o4rWlq32DROZwDbb63 xFjvMPL4CT0SGEchxJgLes3TbnB3VCfPhvRF5JiE9MqTFTSuxIvrFTmtjWlD1l+pBiKJ 0nPOBEg+kSu9D6mpobJCggAgobbjB71QUPDyGcHEfY+4FSDDJfwGK0SvPg7kmH4rI4My 4agQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=caKzWOB4UBzcA6CKNvNm8KcbJgri/lMEEKGcvT6J+cU=; b=Li3ln9ZoD8f6zRTTZdFwXDH3GWC8G6yC6TI5QJWvnnxcyVNhTKTuGyiAE0AIRD2vq+ 7WgoGUWbG52hXcU0kGLMy7GcB3btF7WAM/1IDLYa5PCxmKvM5aQ0wWnD4spWeMLVXIpI 6Xsmfzs5Lj5wJIW2jsht8gSEOGoqNThCCJ5Kn+KUR5CaLNftjnAXL1AfUixTMeYS7SwQ 83mA4y5cTN3cB0dUYCHOpWMDKYLD9CmRxkBWpBsT0tiYxuTdoBzr8GrjeVpuY9uVuqrz Im85yh0WBkvH5fLgPl2mUpc4yUToPrhTQ8EzcXdd2Qlj3nizlI3jO12AWBGEHM0apqko u9Tw== X-Gm-Message-State: AOAM532/t5mQV7xNdmTJYfxO+G/z/sVFiMzP1zE5mGovrshiJs+7VZz3 M8sgYFMzVtYk4qU1eX0s+rwg7oTRo/IYABG9Yhosuw== X-Received: by 2002:a37:a97:: with SMTP id 145mr1039672qkk.465.1606889891370; Tue, 01 Dec 2020 22:18:11 -0800 (PST) MIME-Version: 1.0 References: <20201117232003.3580179-1-joel@joelfernandes.org> <20201117232003.3580179-27-joel@joelfernandes.org> <20201125134237.GZ2414@hirez.programming.kicks-ass.net> In-Reply-To: <20201125134237.GZ2414@hirez.programming.kicks-ass.net> From: Josh Don Date: Tue, 1 Dec 2020 22:18:00 -0800 Message-ID: Subject: Re: [PATCH -tip 26/32] sched: Add a second-level tag for nested CGroup usecase To: Peter Zijlstra 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > All this API stuff here is a complete and utter trainwreck. Please just > delete the patches and start over. Hint: if you use stop_machine(), > you're doing it wrong. Yes, agree on stop_machine(); we'll pull that out of the underlying interface patch. Thanks, Josh