Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3767559pxj; Mon, 24 May 2021 14:32:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyU/M4cyQPBhqN9fWpm5bJmXVtIXlfl6TfQhChnFQABsFPpnlGPBffzw/J8uMkEeF6x7WEY X-Received: by 2002:aa7:d758:: with SMTP id a24mr27802519eds.220.1621891928208; Mon, 24 May 2021 14:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621891928; cv=none; d=google.com; s=arc-20160816; b=bPS7AwZiIDFllTtYFZp8zP/HjYgH2s8e68NaKA+C07qs8hvYFlWQfNoXbYU4GrixER kkNyWs8B02KKBL1xjKoiaJYZa6LIQtw+g/O/4jabxiW+BQaavVmQOx14+lQs0szHaA32 kbtC3qLfYrpRtY7WByJFcCjCrF7wsb45glg3LSt26mqF5usZz+4tnCzTp7CTK50y7XK9 0kxThlfwTywZbBgHRBgY1w+/Nzjbl+6ugTzJRgFM20mD6jaGELTfgO3jUv/DjyX5SmiS yrckIet/ITMqznbCSMnxhOJGHy/T9f8OE3es1Q7FU4IIz/W3NYFzXU01jpSeilbGt/yH TjKg== 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=TMvdJ6e0TGJthcew58hIcfEGy6yVN34K0vE2tf/+Bz8=; b=bn38XjliinGdOquwM4CruwZR8+IYpXlam0nY/tjJzcLbO1otxqiM8kWG0peZzgsTyZ P17K0iuVxKrC08yMrLGs7967YkP+nKgNLPmHUyofmeQGlQzfFDvXTnE3xZf2Lp6AfNzl ruUKSObmEpkUbohKapMTrVmpVcDUnB+CQSE54Rol176JmUpZLAHXgyBlGqArUZiPTiQz 3gA/YPwL2UUlC1YOAydYBWRZ5aX7pxrHSjlaZo5LlJHVVF8jy0IEIAD8t2aPtujQ4Z9u n+ZRuqP6n41Ugp/N0nYS3OmMgRhh4YWSv6VeRc6/+x5VXoGZDA8Ewl7k5b7MR3ht0D86 zHRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=KR49QNaO; 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 i26si13804690ejy.283.2021.05.24.14.31.44; Mon, 24 May 2021 14:32:08 -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=@joelfernandes.org header.s=google header.b=KR49QNaO; 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 S233583AbhEXUwY (ORCPT + 99 others); Mon, 24 May 2021 16:52:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233529AbhEXUwY (ORCPT ); Mon, 24 May 2021 16:52:24 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F38C061574 for ; Mon, 24 May 2021 13:50:56 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id e10so24549076ilu.11 for ; Mon, 24 May 2021 13:50:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TMvdJ6e0TGJthcew58hIcfEGy6yVN34K0vE2tf/+Bz8=; b=KR49QNaO3RaeLTWOp0O3Ikqj0zvsIuqdHw4FQcsF0j8WugcIZTn0elIwpJTORZ7IIY nmjT4lUolNjUAPdvei9EcfHHow9nKEbb/7172md9Yp0deLZKcFbXz6C/sXwO0aIKCdPH Id4WO3vuPXuzBsOZq2S58mK512e7S6DGBPACI= 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=TMvdJ6e0TGJthcew58hIcfEGy6yVN34K0vE2tf/+Bz8=; b=Egr/3x7bZdDkxO1f+nfixciFMX2LOQnttarVGViIhBTRVFP6Fzo0+EYdlhk4sTIbFM uw8XavL+dwnD9OZBBJdZAWixLaqZFuHUZaxctW8r221rE5aYLLFW1IS9UBc8cH6HiQPa RopqUVyCG7DlhBMZ034s8SG0JfmF0JpBr4XUnd8fGMdcyA0KHzan/7Cd18qgbTxrbk+j HNX2uYxUBlEYrfK5rbaaZSVS+aIcXdD5Z1/32f4W328Of0awUF9FflTIpF+duD7DXred xAA3dgCyFg5ZCt9RyiIQHwMox2S9yUJMI5Op3ZxQUrLCReONJVgQnECE6rI2wo19lxkl ue4A== X-Gm-Message-State: AOAM53279FdB9BH4duxAheersFt49JMAmeONqDg0/58MdHxx68FpiARE D13aIqXBqHVVt8Z3K/68/B7yB4A5ktYm6Z2uS6yUDSy6DDs= X-Received: by 2002:a05:6e02:1d82:: with SMTP id h2mr15039646ila.78.1621889454492; Mon, 24 May 2021 13:50:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joel Fernandes Date: Mon, 24 May 2021 16:50:43 -0400 Message-ID: Subject: Re: config SCHED_CORE To: Peter Zijlstra Cc: Hugh Dickins , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 9:36 AM Peter Zijlstra wrote: > > On Fri, May 21, 2021 at 07:57:35AM -0400, Joel Fernandes wrote: > > > > --- > > > kernel/Kconfig.preempt | 14 +++++++++++++- > > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > > > diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt > > > index ea1e3331c0ba..3c4566cd20ef 100644 > > > --- a/kernel/Kconfig.preempt > > > +++ b/kernel/Kconfig.preempt > > > @@ -104,4 +104,16 @@ config SCHED_CORE > > > bool "Core Scheduling for SMT" > > > default y > > > depends on SCHED_SMT > > > - > > > + help > > > + This option enables Core scheduling, a means of coordinated task > > > + selection across SMT siblings with the express purpose of creating a > > > + Core wide privilidge boundary. When enabled -- see prctl(PR_SCHED_CORE) > > > + -- task selection will ensure all SMT siblings will execute a task > > > + from the same 'core group', forcing idle when no matching task is found. > > > + > > > + This provides means of mitigation against a number of SMT side-channels; > > > + but is, on its own, insufficient to mitigate all known side-channels. > > > + Notable: the MDS class of attacks require more. > > > + > > > + Default enabled for anything that has SCHED_SMT, when unused there should > > > + be no impact on performance. > > > > This description sort of makes it sound like security is the only > > usecase. Perhaps we can also add here that core-scheduling can help > > performance of workloads where hyperthreading is undesired, such as > > when VM providers don't want to share hyperthreads. > > > > Thoughts? > > You're right. And there's this whole class of people who want to use > this to eliminate SMT interference. That's good, even more core scheduling users ;-) > I'll see if I can work that in > without turning the whole thing into a novella or so ;-/ Your patch looked good to me (delta Randy/Hugh's comments). I still owe you the documentation patch refresh, I'll send it out soon. Thanks, - Joel