Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2243653pxf; Sat, 20 Mar 2021 08:54:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9dGAOuxkCHv/66oP1FR+gyd25pygmIibUcFpp076R8RPyJBijXcLpJomOB/nTX+LEDEs8 X-Received: by 2002:a17:906:6882:: with SMTP id n2mr10256616ejr.50.1616255667340; Sat, 20 Mar 2021 08:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616255667; cv=none; d=google.com; s=arc-20160816; b=awx9UYNMrJEwvgbf13DKW3/xP1kUjOb4lMtSufYJ2aerZSmcZe7av1h6B28P7N6fVo dfR1aepLW7usbKRkdl8FTj/t/w+GHIjJD/fVwM5w2r3oZ2tlKTbzueUGFJmphMe1rzNn ZBx3JlOejJfdNQ1prXm6EBKxlYQ0ieKvhq9jq4icOe+WrnbJ2tg6hs9bZrXiqc8SXpyj dCFtM5DQO2v+4PLDthpaUUqz9ApyJFpCncDMQhxNz/QYyGAo0I0ETWfcCyZbD3XzNWcA jrNxl7fIIgwpZoXxkqxHqKonrCu1NPctgS4FV/mAfAb6Lwh7w3AL4F18sSWUai4VVwHZ TeYA== 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=T6ts3lUqEqANqquwyBrmLYEq2ggW88CY7TmJE3kNSqc=; b=CGzJESp7FFAtjXUJFPkqLfYeUtqaoBhyWg+aB6ICW01RSxUk/hE+iVywo7L121KiCi vmI4roMwnm7cNSslbPL8VtniHJ+ueUDUbWC1SUxjajzXRNfb1JacDTxb2ysd5aaTjQc/ +0o67s7liodTo2ViTKOkT7kPlKPxOB+Zl23QLf7NsGQY7DZX1tQcWIkKMatrvLBqq+fI dtbAeFeu5NGobtSwgoOPMiKdDiEk3TY9xlGlGVj4rV3JpmC2bQyN8beE8wOlOG1kXJzc /41r3YCYSFZiE1pUY0Ys6qaDE+bEKwVibLkXZVxaVo5dJRQaNuB2P5RamBOUYgCPnWDj CqXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="r/UZPiE/"; 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 y2si6899292edu.245.2021.03.20.08.54.04; Sat, 20 Mar 2021 08:54:27 -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="r/UZPiE/"; 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 S229640AbhCTPxD (ORCPT + 99 others); Sat, 20 Mar 2021 11:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbhCTPwd (ORCPT ); Sat, 20 Mar 2021 11:52:33 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC304C061574 for ; Sat, 20 Mar 2021 08:52:32 -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=T6ts3lUqEqANqquwyBrmLYEq2ggW88CY7TmJE3kNSqc=; b=r/UZPiE/RloFVMEZ2GWlauPmDj 07214o3v7iVSpRi9+/F2MQ38s4s0be9uVZGBCBFyF19wnwpBG75t1rnmpZB8fGymwEFxLMjddVb0A CFp5RnImpkWdovh0ppCFYQ8hJ9Fsf6x60nL4KrXhQxhreuO+xUx4JWLhpCAo8FgciGLqSzal6MFUc 9GohQkBKEcNC3jLUfCdXKfoRUSGhRDOQaZ88CXIgoKvs5sKhuG/jOBHXo/Z6QQwC2O1KA7ksEnQKe 6dQiKMDbjQ15QOCFTfbnvu9q5VIyXPn6ey9g2GtU+VGGh3xjM5sn0Z3NoBztynnq1M680a0eLKwNH 5mKYhNrA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lNdst-00601U-Nn; Sat, 20 Mar 2021 15:51:28 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 5B5159864FF; Sat, 20 Mar 2021 16:51:27 +0100 (CET) Date: Sat, 20 Mar 2021 16:51:27 +0100 From: Peter Zijlstra To: "Joel Fernandes (Google)" Cc: Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, keescook@chromium.org, 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, rostedt@goodmis.org, benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , chris.hyser@oracle.com, Josh Don , Hao Luo , Tom Lendacky Subject: Re: [PATCH 3/6] sched: prctl() cookie manipulation for core scheduling. Message-ID: <20210320155127.GA4746@worktop.programming.kicks-ass.net> References: <20210319203253.3352417-1-joel@joelfernandes.org> <20210319203253.3352417-4-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319203253.3352417-4-joel@joelfernandes.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 19, 2021 at 04:32:50PM -0400, Joel Fernandes (Google) wrote: > include/linux/sched.h | 7 ++ > include/linux/sched/task.h | 4 +- > include/uapi/linux/prctl.h | 7 ++ > kernel/sched/core.c | 11 +- > kernel/sched/coretag.c | 197 +++++++++++++++++++++++++++++-- > kernel/sched/sched.h | 2 + > kernel/sys.c | 7 ++ > tools/include/uapi/linux/prctl.h | 7 ++ > 8 files changed, 230 insertions(+), 12 deletions(-) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index 2e3024a6f6e1..a62e8ad5ce58 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -4654,11 +4654,17 @@ unsigned long nr_iowait(void) > * sched_exec - execve() is a valuable balancing opportunity, because at > * this point the task has the smallest effective memory and cache footprint. > */ > -void sched_exec(void) > +int sched_exec(void) > { > struct task_struct *p = current; > unsigned long flags; > int dest_cpu; > + int ret; > + > + /* this may change what tasks current can share a core with */ > + ret = sched_core_exec(); > + if (ret) > + return ret; Did the hunk for fs/exec.c go missing?