Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1397643pxj; Fri, 21 May 2021 13:15:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJK8Gg2Ox1SsNLZjOPBSumWW3OJk6/OnoX1G+p1OoCy4xitK6aHzJfU3KwsBgTHkiR2Fzg X-Received: by 2002:a02:b107:: with SMTP id r7mr7305769jah.8.1621628100298; Fri, 21 May 2021 13:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628100; cv=none; d=google.com; s=arc-20160816; b=TOReBdPPfKkINua/6Jv8L0u5Ms6X7RmTzmxfKic8CoVNReaPJoUgsbPKOOR1UOyaa/ YPV98um50qhcDnogGwsqbzXi/2qSZGrbdtBLIi9s21Ov/CkofQPnFveTTi9mCue8imnb OD8+u8q36n3ivPxS5RxD+6nx+eoYbXqYS16nWHRXKWL/Ou59ZjIHg5DLrv+SOJTblOUP n5Sj0DuZkPVlCZ2oFLdhakqbecpRaKp5zqWs8DXRlU0gu5t+05233x5wSVU5nLIECryq M21KMIPx6WNENDmI+fE4sWWLeIe56MhdDygR8CotOWwB+A1dSUNAWo82DZoR6XWcs+Vi 33mQ== 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=XGeIrOpcuP6wbP/zIsOF2etDIqU10NJ58UYzjMALJZg=; b=HLSE1KiQAnzFzWNCvkHArzvbt6NivsNcv00kuXiGnyCkzIx9d7CbVABOOTLdIIbgsP deOgcmxVHNJWKzXe6Pwo+j54ejGpFO9wECttpdwO3OchoYrr26/n6+M1mYNcQox9WNG+ cWduxgNfPG+NfjIC4xgwIZT2B8yF1m4aXCko/jQpLe+zD3NlLK9Jf4fklJMfBaG6nSlp ZK44DdjhzOjBJo8kGlhIIQw4Y1ZG9yD8Qhmc3RpmgXly4TjeKXLK4lfzuGqWujdGqVd5 nEpOk7p4GqWZdVOvorBjFUlqxMEB3zsm+hD9nT3i53MNy0m99WDbNmSmgeje7xhvA5Qq t9tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=bWYfSzP8; 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 a11si5488120ild.92.2021.05.21.13.14.46; Fri, 21 May 2021 13:15:00 -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=bWYfSzP8; 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 S232167AbhEUL71 (ORCPT + 99 others); Fri, 21 May 2021 07:59:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234947AbhEUL7L (ORCPT ); Fri, 21 May 2021 07:59:11 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 999D1C061574 for ; Fri, 21 May 2021 04:57:46 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id n10so19851478ion.8 for ; Fri, 21 May 2021 04:57:46 -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=XGeIrOpcuP6wbP/zIsOF2etDIqU10NJ58UYzjMALJZg=; b=bWYfSzP8CxiWns4gr5nTVLcLCOCCBoFXcUJxPAzW9e9IcV37buU4SMIqgHWph2+6Gc FD50i6XBqdJ63H7RgKdCyB7a1x5m/8UnWN1ePSk2fyZJV5YkDu/Cra0pTpfw8PGM4mr5 /L/G7LgKBwHT4poWVfsf1Nip7g4lTh/XjDtAU= 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=XGeIrOpcuP6wbP/zIsOF2etDIqU10NJ58UYzjMALJZg=; b=NYcWTnJpi3FUWxpru4LDCqkOUBDo8jUQQVVrgsXyVeE6a34a0MWrBpCWYNPOzZkDpN YCBrygkFLDvUTCVB0szTY0NDovdVfIlm16bKOBDuKt6BpNxepA/afH2IOwjUXEIB8S9t R7HBqweVQ7AhdmUbaF6DSlFX7LEj4eIVu6QnzG1AfmxC/me42rjKy2FwBchgOle2NEH0 OLtkeqCmhm5TotEsk8aHDmzIBKRcF7yBDr9mkantlTfJ3PVBtocKc0Guqe72qHMQoSlI xz6zUEZCb5aXdZ0l253nERt+nOlSp/0Okuz95WjxtzaTujcIJAAA0LW6SUu2jXt/jqDn z4Cw== X-Gm-Message-State: AOAM530V8bD+ZQDAvqCDMxx4JtRIayOLsGhSaaEptH5WJjZitIz0eRMI lordftF7ZTpLlNN1IEEQpF8gY+fLwcRPAo0kkHHRwu8CWl8= X-Received: by 2002:a05:6638:1650:: with SMTP id a16mr3863442jat.23.1621598265867; Fri, 21 May 2021 04:57:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joel Fernandes Date: Fri, 21 May 2021 07:57:35 -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 3:53 AM Peter Zijlstra wrote: > > On Thu, May 20, 2021 at 08:06:07PM -0700, Hugh Dickins wrote: > > Hi Peter, > > > > make oldconfig gave me no help at all on how to decide whether to choose > > SCHED_CORE Y or n, beyond it recommending Y. Maybe you'll delete that > > option later, or maybe removing the prompt string would silence it. > > Ah, you're quite right. I never seem to have gotten around to actually > writing anything useful there :/ Similarly the documentation for all > this seems to have gone missing too. > > Joel, could I ask you to refresh the document to match the current state > of things and repost? I still whole hartedly despise this RST crud, it > makes it so hard to read / modify the files. > > ( I think the latest version is here: > https://lkml.kernel.org/r/20210324214020.34142-8-joel@joelfernandes.org > ) > > Anyway, how is something like the below, Joel can add a reference to the > document once it's there. > > --- > 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?