From: Randy Dunlap <rdunlap@infradead.org>
To: Hugh Dickins <hughd@google.com>, Peter Zijlstra <peterz@infradead.org>
Cc: Joel Fernandes <joel@joelfernandes.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: config SCHED_CORE
Date: Sun, 23 May 2021 14:31:14 -0700 [thread overview]
Message-ID: <6193be11-a92d-23a9-e999-ae785ffa73bb@infradead.org> (raw)
In-Reply-To: <alpine.LSU.2.11.2105231252070.29171@eggly.anvils>
On 5/23/21 1:30 PM, Hugh Dickins wrote:
> On Sun, 23 May 2021, Peter Zijlstra wrote:
>> On Fri, May 21, 2021 at 07:57:35AM -0400, Joel Fernandes wrote:
>>> On Fri, May 21, 2021 at 3:53 AM Peter Zijlstra <peterz@infradead.org> wrote:
>>>> + 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.
>>
>> Something like so then?
>
> Much more helpful, thanks. And I agree that you have to keep it fairly
> brief here: I think you've struck the right balance. Some nits below.
>
>>
>> ---
>> kernel/Kconfig.preempt | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>>
>> diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
>> index ea1e3331c0ba..cd497fecfd43 100644
>> --- a/kernel/Kconfig.preempt
>> +++ b/kernel/Kconfig.preempt
>> @@ -104,4 +104,18 @@ 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
>
> Maybe s/scheduling/Scheduling/ to match the title?
>
> I think I got the picture once I reached the end, but was confused here
> by the stages of enablement. s/This option enables/This option permits/
> would be clearer, I think.
>
I like all of Hugh's suggestions...
>
>> + selection across SMT siblings. When enabled -- see
>> + prctl(PR_SCHED_CORE) -- task selection will ensure all SMT siblings
>
> s/will ensure/ensures that/ (it felt like too many "will"s before)
especially that one. ^^^
>> + will execute a task from the same 'core group', forcing idle when no
>> + matching task is found.
>> +
>> + Use of this feature includes:
>> + - mitigation of some (not all) SMT side channels;
>> + - limiting SMT interference to improve determinism and/or performance.
>> +
>> + Default enabled for anything that has SCHED_SMT, when unused there
>
> "SCHED_CORE is default enabled when SCHED_SMT is enabled - when unused there"
> would be better.
>
>> + should be no impact on performance.
thanks.
--
~Randy
next prev parent reply other threads:[~2021-05-23 21:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 3:06 config SCHED_CORE Hugh Dickins
2021-05-21 7:53 ` Peter Zijlstra
2021-05-21 11:18 ` Joel Fernandes
2021-05-21 11:57 ` Joel Fernandes
2021-05-21 13:33 ` Peter Zijlstra
2021-05-24 20:50 ` Joel Fernandes
2021-05-23 10:57 ` Peter Zijlstra
2021-05-23 20:30 ` Hugh Dickins
2021-05-23 21:31 ` Randy Dunlap [this message]
2021-05-21 16:09 ` Randy Dunlap
2021-05-25 7:05 ` [PATCH] sched: Add CONFIG_SCHED_CORE help text Peter Zijlstra
2021-05-25 17:24 ` Randy Dunlap
2021-05-25 22:17 ` Hugh Dickins
2021-06-01 14:04 ` [tip: sched/core] " tip-bot2 for Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6193be11-a92d-23a9-e999-ae785ffa73bb@infradead.org \
--to=rdunlap@infradead.org \
--cc=hughd@google.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).