config SCHED_CORE
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.
I decided that I probably need kernel/sched/core.o, so chose Y :)
Hugh
Quoted 5 lines · Hugh Dickins
Hi Peter,
make oldconfig gave me no help at all on how to decide whether to choose
SCHED_COREY 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/[email protected]
)
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(-)
kernel/Kconfig.preempt +13 -1
@@ -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.
Quoted 16 lines · Peter Zijlstra
Quoted 5 lines · Hugh Dickins
Hi Peter,
make oldconfig gave me no help at all on how to decide whether to choose
SCHED_COREY 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.
Quoted 6 lines
( I think the latest version is here:
https://lkml.kernel.org/r/[email protected]
)Anyway, how is something like the below, Joel can add a reference to the document once it's there.
Sure thing, Peter! I will work on it and post a patch.
- Joel
Quoted 27 lines
--- kernel/Kconfig.preempt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)kernel/Kconfig.preempt +13
-1@@ -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.
Quoted 39 lines · Peter Zijlstra
Quoted 5 lines · Hugh Dickins
Hi Peter,
make oldconfig gave me no help at all on how to decide whether to choose
SCHED_COREY 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/[email protected]
)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(-)kernel/Kconfig.preempt +3
-1@@ -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
kernel/Kconfig.preempt config SCHED_CORE · line 119
Quoted 10 lines
kernel/Kconfig.preempt +10
-0+ 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?
Quoted 32 lines · Joel Fernandes
Quoted 16 lines
--- kernel/Kconfig.preempt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)kernel/Kconfig.preempt +3
-1@@ -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 akernel/Kconfig.preempt config SCHED_CORE · line 119
Quoted 10 lines
kernel/Kconfig.preempt +10
-0+ 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.
Quoted 1 line
Thoughts?
You're right. And there's this whole class of people who want to use this to eliminate SMT interference. I'll see if I can work that in without turning the whole thing into a novella or so ;-/
Quoted 35 lines · Peter Zijlstra
Quoted 32 lines · Joel Fernandes
Quoted 16 lines
--- kernel/Kconfig.preempt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)kernel/Kconfig.preempt +3
-1@@ -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 akernel/Kconfig.preempt config SCHED_CORE · line 119
Quoted 10 lines
kernel/Kconfig.preempt +10
-0+ 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.
Quoted 4 lines
Quoted 1 line
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 ;-)
Quoted 2 lines
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
Quoted 11 lines · Joel Fernandes
Quoted 10 lines · Peter Zijlstra
(quoted diff) +10
-0+ 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.
Quoted 8 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ + 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?
--- kernel/Kconfig.preempt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
kernel/Kconfig.preempt +14 -0
@@ -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 + selection across SMT siblings. 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. + + 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 + should be no impact on performance. +
Quoted 21 lines · Peter Zijlstra
Quoted 11 lines · Joel Fernandes
Quoted 10 lines · Peter Zijlstra
(quoted diff) +10
-0+ 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.Quoted 8 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ + 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.
Quoted 1 line
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.
Quoted 10 lines
--- kernel/Kconfig.preempt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)kernel/Kconfig.preempt +0
-0
kernel/Kconfig.preempt config SCHED_CORE · line 108
Quoted 5 lines
kernel/Kconfig.preempt +2
-0@@ -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.
kernel/Kconfig.preempt config SCHED_CORE · line 110
Quoted 2 lines
kernel/Kconfig.preempt +2
-0+ 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)
kernel/Kconfig.preempt config SCHED_CORE · line 118
Quoted 8 lines
kernel/Kconfig.preempt +8
-0+ 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.
kernel/Kconfig.preempt config SCHED_CORE · line 120
Quoted 2 lines
kernel/Kconfig.preempt +2
-0+ should be no impact on performance. +
Thanks,
Hugh
Quoted 45 lines · Hugh Dickins
Quoted 21 lines · Peter Zijlstra
Quoted 11 lines · Joel Fernandes
Quoted 10 lines · Peter Zijlstra
(quoted diff) +10
-0+ 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.Quoted 8 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ + 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.
Quoted 1 line
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.
Quoted 10 lines
--- kernel/Kconfig.preempt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)kernel/Kconfig.preempt +0
-0kernel/Kconfig.preempt config SCHED_CORE · line 108
Quoted 5 lines
kernel/Kconfig.preempt +2
-0@@ -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 taskMaybe s/scheduling/Scheduling/ to match the title?
Quoted 4 lines
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...
Quoted 5 lines
kernel/Kconfig.preempt config SCHED_CORE · line 110
Quoted 3 lines
kernel/Kconfig.preempt +2
-0+ selection across SMT siblings. When enabled -- see + prctl(PR_SCHED_CORE) -- task selection will ensure all SMT siblingss/will ensure/ensures that/ (it felt like too many "will"s before)
especially that one. ^^^
Quoted 12 lines
kernel/Kconfig.preempt config SCHED_CORE · line 118
Quoted 8 lines
kernel/Kconfig.preempt +8
-0+ 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_COREis default enabled whenSCHED_SMTis enabled - when unused there" would be better.
Quoted 1 line
kernel/Kconfig.preempt config SCHED_CORE · line 119
Quoted 1 line
kernel/Kconfig.preempt +1
-0+ should be no impact on performance.
thanks.
Signature · 1 line
~Randy
Quoted 31 lines · Peter Zijlstra
Quoted 5 lines · Hugh Dickins
Hi Peter,
make oldconfig gave me no help at all on how to decide whether to choose
SCHED_COREY 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/[email protected]
)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(-)kernel/Kconfig.preempt +0
-0
kernel/Kconfig.preempt config SCHED_CORE · line 110
Quoted 8 lines
kernel/Kconfig.preempt +4
-1@@ -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)
privilege
while you are at it.
Quoted 10 lines
kernel/Kconfig.preempt +9
-0+ -- 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.
Signature · 1 line
~Randy
PATCH 1/1 sched: Add CONFIG_SCHED_CORE help text
In reply to Hugh DickinsSubject: sched: Add CONFIG_SCHED_CORE help text
From: Peter Zijlstra <[email protected]>
Date: Tue May 25 08:53:28 CEST 2021
Hugh noted that the SCHED_CORE Kconfig option could do with a help text.
--- kernel/Kconfig.preempt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
kernel/Kconfig.preempt +14 -0
@@ -104,4 +104,18 @@ config SCHED_CORE bool "Core Scheduling for SMT" default y depends on SCHED_SMT + help + This option permits Core Scheduling, a means of coordinated task + selection across SMT siblings. When enabled -- see + prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings + 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. + + SCHED_CORE is default enabled when SCHED_SMT is enabled -- when + unused there should be no impact on performance. +
Re: [PATCH] sched: Add CONFIG_SCHED_CORE help text
Quoted 9 lines · Peter Zijlstra
Subject: sched: Add
CONFIG_SCHED_COREhelp text
From: Peter Zijlstra <[email protected]>
Date: Tue May 25 08:53:28 CEST 2021Hugh noted that the
SCHED_COREKconfigoption could do with a help text.Requested-by Hugh Dickins <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>
Thanks.
Quoted 26 lines
--- kernel/Kconfig.preempt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)kernel/Kconfig.preempt +14
-0@@ -104,4 +104,18 @@ config SCHED_CORE bool "Core Scheduling for SMT" default y depends on SCHED_SMT + help + This option permits Core Scheduling, a means of coordinated task + selection across SMT siblings. When enabled -- see + prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings + 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. + + SCHED_CORE is default enabled when SCHED_SMT is enabled -- when + unused there should be no impact on performance. +
Signature · 1 line
~Randy
Re: [PATCH] sched: Add CONFIG_SCHED_CORE help text
In reply to Peter ZijlstraQuoted 9 lines · Peter Zijlstra
Subject: sched: Add
CONFIG_SCHED_COREhelp text
From: Peter Zijlstra <[email protected]>
Date: Tue May 25 08:53:28 CEST 2021Hugh noted that the
SCHED_COREKconfigoption could do with a help text.Requested-by Hugh Dickins <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>
Thanks,
if necessary (but there's more than enough of me there already).
Quoted 24 lines
--- kernel/Kconfig.preempt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)kernel/Kconfig.preempt +14
-0@@ -104,4 +104,18 @@ config SCHED_CORE bool "Core Scheduling for SMT" default y depends on SCHED_SMT + help + This option permits Core Scheduling, a means of coordinated task + selection across SMT siblings. When enabled -- see + prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings + 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. + + SCHED_CORE is default enabled when SCHED_SMT is enabled -- when + unused there should be no impact on performance. +
[tip: sched/core] sched: Add CONFIG_SCHED_CORE help text
In reply to Peter ZijlstraThe following commit has been merged into the sched/core branch of tip:
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 7b419f47facd286c6723daca6ad69ec355473f78 Gitweb: https://git.kernel.org/tip/7b419f47facd286c6723daca6ad69ec355473f78 Author: Peter Zijlstra <[email protected]> AuthorDate: Tue, 25 May 2021 08:53:28 +02:00 Committer: Peter Zijlstra <[email protected]> CommitterDate: Tue, 01 Jun 2021 16:00:10 +02:00
sched: Add CONFIG_SCHED_CORE help text
Hugh noted that the SCHED_CORE Kconfig option could do with a help text.
--- kernel/Kconfig.preempt | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
kernel/Kconfig.preempt +14 -0
@@ -104,4 +104,18 @@ config SCHED_CORE bool "Core Scheduling for SMT" default y depends on SCHED_SMT + help + This option permits Core Scheduling, a means of coordinated task + selection across SMT siblings. When enabled -- see + prctl(PR_SCHED_CORE) -- task selection ensures that all SMT siblings + 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. + + SCHED_CORE is default enabled when SCHED_SMT is enabled -- when + unused there should be no impact on performance. +