Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp912036pxf; Wed, 7 Apr 2021 14:53:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpfokgAfqHPP6uCKgELNTRlFCQPwfuSdh37C6pfwwAhdn5ZZBxppts4FyWQH1dqqqMjNdC X-Received: by 2002:a63:1f02:: with SMTP id f2mr5108439pgf.195.1617832409962; Wed, 07 Apr 2021 14:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617832409; cv=none; d=google.com; s=arc-20160816; b=Q2XjqYHVMjloh/lDI0Pv95Gp/jcNN4e9/w2tOQ/g1j2GBbNU5FKY3rWYzwsWX70GVL ww800aO8CN3gPlKOwhAWercTJemNm2VOiNPRYWUKyLijf5mPa7N5yIeIm5uJzl3WXj0k bDXqL9Qfi2rN34vVwM+ok5/B1vEVTjc4M3D0vgWSiJyrwHFYbA8MrMOUIrMAKWJnmE9J KYn79IFyQ75kHKugYn6Pp55PbyQZHAegM4s6YZZ/23bFtwPxRhsrRTcSHr4QDTJ6QmFV Z9MNXPXYMD7arg4R2ZKQF0hpIukLTR5zO7M9gZNtyrpXi3bW/RBWQwh0R8xCNnEyryFT udMQ== 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=TevWoQq5Glq6ytD9AXpDyqi4WvX3U1InyNLnaDshZWg=; b=M8/qMPJ+baVIvuckZYjOsCgCTEB7wwkiwyjekkCuK+rp4ztus2cTky96e3RosoBqKi M2xIws3jvqaQaFJGGSe9OwwPFMmxnjsF3rUrwfYNAY5RekmX7SRwbELlYeADOH5yhIZF 67j/eWFf7+JNx+4Uh8+buGBBq5bSg/Mlagfn4nNJZKMebzTxt4R/VtXn3Mjn5aED+E6B ILew299sGZEZA/4oe34yNBgu8ksYXFBMYmzoHH+RxlopzyA5JYZu0vQsVc2keoa8Qamv eBY0az+LkGva2Z+ovehMTDtrcHxQ7yYLubMQqnbFkl2VUre8meX/wtcNLe0Jgo6IbKN5 XzFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=AHWVjJW9; 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 u4si8638839plg.371.2021.04.07.14.53.17; Wed, 07 Apr 2021 14:53:29 -0700 (PDT) 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=AHWVjJW9; 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 S236282AbhDGSlR (ORCPT + 99 others); Wed, 7 Apr 2021 14:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbhDGSlM (ORCPT ); Wed, 7 Apr 2021 14:41:12 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A5AC061760 for ; Wed, 7 Apr 2021 11:41:02 -0700 (PDT) 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=TevWoQq5Glq6ytD9AXpDyqi4WvX3U1InyNLnaDshZWg=; b=AHWVjJW9sXMfdWd06nX21+YP7H 7IdMnbmvoOgZ+ECTL1Grbnkrp4mqzmanNEMnx5cxhvnMz+RlgMAGM9aejmpl3NywWL7IT4iRko3ZS oQEJI0JtN1XUy37VT0sIISDanaPeYhtMwLPB2zIKtHrLrU53dMzuqANprqPrhJG4UW3Xir88vW37P j1Vg4X/pZ7u7RQ9uXk5RXYclwsNTxKj/GI9qZuAUbsHgtQNVtw6UK3xVkEaNpleBW+orp+U1K5X24 I5FtXYE5UT4Qx12rygEncgNdNGJaT1AMpQ1aoRPcdidsOS3SAvCwYTys8umi7yaoQ6i0WPJ33Gd7W hxA0vuOA==; 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.94 #2 (Red Hat Linux)) id 1lUD5Z-00EvH0-Op; Wed, 07 Apr 2021 18:39:49 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1ED3D3001FB; Wed, 7 Apr 2021 20:39:40 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DA4B62BC07BB4; Wed, 7 Apr 2021 20:39:40 +0200 (CEST) Date: Wed, 7 Apr 2021 20:39:40 +0200 From: Peter Zijlstra To: Tejun Heo Cc: joel@joelfernandes.org, chris.hyser@oracle.com, joshdon@google.com, mingo@kernel.org, vincent.guittot@linaro.org, valentin.schneider@arm.com, mgorman@suse.de, linux-kernel@vger.kernel.org, tglx@linutronix.de, Michal =?iso-8859-1?Q?Koutn=FD?= , Christian Brauner , Zefan Li Subject: Re: [PATCH 0/9] sched: Core scheduling interfaces Message-ID: References: <20210401131012.395311786@infradead.org> 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, Apr 06, 2021 at 12:08:50PM -0400, Tejun Heo wrote: > I see. Yeah, if we really need it, I'm not sure it fits in cgroup interface > proper. As I wrote elsewhere, these things are usually implemented on the > originating subsystem interface with cgroup ID as a parameter. This would be something like: prctl(PR_SCHED_CORE, PR_SCHED_CORE_SHARE_FROM, cgroup-fd, PIDTYPE_CGROUP, NULL); right? Where we assign to self the cookie from the cgroup. The problem I see with this is that a task can trivially undo/circumvent this by calling PR_SCHED_CORE_CLEAR on itself, at which point it can share with system tasks again. Also, it doesn't really transfer well to the group/tasks thing. When a task joins a cgroup, it doesn't automagically gain the cgroup properties. Whoever does the transition will then also have to prctl() this, which nobody will do.