x86: avoid confusion over the new RESCTRL config prompt
Subsystems (4)
PATCH 1/1 x86: avoid confusion over the new RESCTRL config prompt
"Resource Control" is a very broad term for this CPU feature, and a term that is also associated with containers, cgroups etc. This can easily cause confusion.
Make the user prompt more specific.
--- arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
As somebody who works in "resource control", this prompt in oldconfig certainly had me go wtf. Can we do something more specific?
Not insisting on this name, and I haven't renamed all the config symbols yet, but we should probably fix this before 5.0 is released.
Thanks!
arch/x86/Kconfig +2 -2
@@ -447,11 +447,11 @@ config RETPOLINE support for full protection. The kernel may run slower. config X86_RESCTRL - bool "Resource Control support" + bool "x86 cache control support" depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD) select KERNFS help - Enable Resource Control support. + Enable x86 cache control support. Provide support for the allocation and monitoring of system resources usage by the CPU.
Signature · 1 line
2.20.1
Quoted 6 lines · Johannes Weiner
"Resource Control" is a very broad term for this CPU feature, and a term that is also associated with containers, cgroups etc. This can easily cause confusion.
Make the user prompt more specific.
Quoted 7 lines
Signed-off-by Johannes Weiner <[email protected]>--- arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)As somebody who works in "resource control", this prompt in oldconfig certainly had me go wtf. Can we do something more specific?
Well, since this is an interface to a hardware feature, we could call it
Hardware Resource Control
for example. I.e., HW_RESCTRL.
Linus had another suggestion - CPU_RESCTRL - which sounds ok to me too.
Quoted 10 lines
Not insisting on this name, and I haven't renamed all the config symbols yet, but we should probably fix this before 5.0 is released.
Thanks!
arch/x86/Kconfig +0
-0
arch/x86/Kconfig config RETPOLINE · line 450
Quoted 5 lines
arch/x86/Kconfig +1
-1@@ -447,11 +447,11 @@ config RETPOLINE support for full protection. The kernel may run slower. config X86_RESCTRL - bool "Resource Control support" + bool "x86 cache control support"
Except that it is not only cache but memory (bandwidth) control too. So I guess
bool "CPU Resource Control support"
or so.
Let the bikeshedding begin!
:-)
Signature · 4 lines
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)Luck, Tony
maintainerQuoted 7 lines · Borislav Petkov
arch/x86/Kconfig config RETPOLINE · line 450
Quoted 3 lines · Johannes Weiner
config
X86_RESCTRLarch/x86/Kconfig +1
-1- bool "Resource Control support" + bool "x86 cache control support"Except that it is not only cache but memory (bandwidth) control too. So I guess
Quoted 5 lines
bool "CPU Resource Control support"
or so.
Let the bikeshedding begin!
I'll just jump on the bandwagon and vote for "CPU Resource Control support".
You are exactly right that this isn't just about cache.
-Tony
Quoted 35 lines · Borislav Petkov
Quoted 6 lines · Johannes Weiner
"Resource Control" is a very broad term for this CPU feature, and a term that is also associated with containers, cgroups etc. This can easily cause confusion.
Make the user prompt more specific.
Quoted 7 lines
Signed-off-by Johannes Weiner <[email protected]>--- arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)As somebody who works in "resource control", this prompt in oldconfig certainly had me go wtf. Can we do something more specific?
Well, since this is an interface to a hardware feature, we could call it
Hardware Resource Control
for example. I.e.,
HW_RESCTRL.Linus had another suggestion -
CPU_RESCTRL- which sounds ok to me too.Quoted 12 lines
Not insisting on this name, and I haven't renamed all the config symbols yet, but we should probably fix this before 5.0 is released.
Thanks!
arch/x86/Kconfig +0
-0@@ -447,11 +447,11 @@ config RETPOLINE support for full protection. The kernel may run slower.
Quoted 7 lines
arch/x86/Kconfig config RETPOLINE · line 450
Quoted 3 lines
arch/x86/Kconfig +1
-1config X86_RESCTRL - bool "Resource Control support" + bool "x86 cache control support"Except that it is not only cache but memory (bandwidth) control too. So I guess
bool "CPU Resource Control support"
This is still awefully close to the cgroup CPU resource controller. Since it's more hardware-specific, and the config symbol also has the x86 in it, how about "x86 CPU resource control support"?
---
From 2a24f6e30ed9dbc0abb96c73ec0e205e07034383 Mon Sep 17 00:00:00 2001
From: Johannes Weiner <[email protected]>
Date: Tue, 29 Jan 2019 17:44:36 -0500
Subject: [PATCH] x86: avoid confusion over the new RESCTRL config prompt
"Resource Control" is a very broad term for this CPU feature, and a term that is also associated with containers, cgroups etc. This can easily cause confusion.
Make the user prompt more specific.
--- arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/Kconfig +2 -2
@@ -447,11 +447,11 @@ config RETPOLINE support for full protection. The kernel may run slower. config X86_RESCTRL - bool "Resource Control support" + bool "x86 CPU resource control support" depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD) select KERNFS help - Enable Resource Control support. + Enable x86 CPU resource control support. Provide support for the allocation and monitoring of system resources usage by the CPU.
Signature · 1 line
2.20.1
Quoted 3 lines · Johannes Weiner
This is still awefully close to the cgroup CPU resource controller. Since it's more hardware-specific, and the config symbol also has the x86 in it, how about "x86 CPU resource control support"?
Fine by me.
What about
s/X86_RESCTRL/X86_CPU_RESCTRL/g
?
Signature · 4 lines
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)Quoted 10 lines · Borislav Petkov
Quoted 3 lines · Johannes Weiner
This is still awefully close to the cgroup CPU resource controller. Since it's more hardware-specific, and the config symbol also has the x86 in it, how about "x86 CPU resource control support"?
Fine by me.
What about
s/X86_RESCTRL/X86_CPU_RESCTRL/g
Good idea.
Tony, Babu, that look okay to you guys as well?
---
From 9ca5fa615f9f5d270c141266c454059a3de2cd39 Mon Sep 17 00:00:00 2001
From: Johannes Weiner <[email protected]>
Date: Tue, 29 Jan 2019 17:44:36 -0500
Subject: [PATCH] x86: avoid confusion over the new X86_RESCTRL config
"Resource Control" is a very broad term for this CPU feature, and a term that is also associated with containers, cgroups etc. This can easily cause confusion.
Make the user prompt more specific. Match the config symbol name.
--- Documentation/x86/resctrl_ui.txt | 2 +- arch/x86/Kconfig | 6 +++--- arch/x86/include/asm/resctrl_sched.h | 4 ++-- arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/resctrl/Makefile | 4 ++-- include/linux/sched.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-)
Documentation/x86/resctrl_ui.txt +1 -1
@@ -9,7 +9,7 @@ Fenghua Yu <[email protected]> Tony Luck <[email protected]> Vikas Shivappa <[email protected]> -This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo +This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo flag bits: RDT (Resource Director Technology) Allocation - "rdt_a" CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
arch/x86/Kconfig +3 -3
@@ -446,12 +446,12 @@ config RETPOLINE branches. Requires a compiler with -mindirect-branch=thunk-extern support for full protection. The kernel may run slower. -config X86_RESCTRL - bool "Resource Control support" +config X86_CPU_RESCTRL + bool "x86 CPU resource control support" depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD) select KERNFS help - Enable Resource Control support. + Enable x86 CPU resource control support. Provide support for the allocation and monitoring of system resources usage by the CPU.
arch/x86/include/asm/resctrl_sched.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_RESCTRL_SCHED_H#define _ASM_X86_RESCTRL_SCHED_H -#ifdef CONFIG_X86_RESCTRL +#ifdef CONFIG_X86_CPU_RESCTRL #include <linux/sched.h> #include <linux/jump_label.h>
@@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void)static inline void resctrl_sched_in (void ) {} -#endif /* CONFIG_X86_RESCTRL */ +#endif /* CONFIG_X86_CPU_RESCTRL */ #endif /* _ASM_X86_RESCTRL_SCHED_H */
arch/x86/kernel/cpu/Makefile +1 -1
@@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o obj-$(CONFIG_X86_MCE) += mce/ obj-$(CONFIG_MTRR) += mtrr/ obj-$(CONFIG_MICROCODE) += microcode/ -obj-$(CONFIG_X86_RESCTRL) += resctrl/ +obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/ obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
arch/x86/kernel/cpu/resctrl/Makefile +2 -2
@@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_X86_RESCTRL) += core.o rdtgroup.o monitor.o -obj-$(CONFIG_X86_RESCTRL) += ctrlmondata.o pseudo_lock.o +obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o +obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o pseudo_lock.o CFLAGS_pseudo_lock.o = -I$(src)
include/linux/sched.h +1 -1
@@ -995,7 +995,7 @@ struct task_struct {/* cg_list protected by css_set_lock and tsk->alloc_lock: */ struct list_head cg_list;#endif -#ifdef CONFIG_X86_RESCTRL +#ifdef CONFIG_X86_CPU_RESCTRL u32 closid;u32 rmid;#endif
Signature · 1 line
2.20.1
Luck, Tony
maintainerQuoted 7 lines
Quoted 3 lines
What about
s/X86_RESCTRL/X86_CPU_RESCTRL/g
Good idea.
Tony, Babu, that look okay to you guys as well?
For now. But very soon we will also have ARM_CPU_RESCTRL, and some of this code will become generic. Will we need an arch-independent name for the bits of code shared by arm and x86?
-Tony
Quoted 3 lines · Tony
For now. But very soon we will also have
ARM_CPU_RESCTRL, and some of this code will become generic. Will we need an arch-independent name for the bits of code shared by arm and x86?
Yes. The idea still is to have the arch-specific stuff under X86_CPU_RESCTRL and ARM_CPU_RESCTRL respectively, and the arch-agnostic pieces under CPU_RESCTRL.
Signature · 4 lines
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)tip-bot for Johannes Weiner
merge bot[tip:x86/urgent] x86/resctrl: Avoid confusion over the new X86_RESCTRL config
In reply to Johannes Weinerx86/resctrl: Avoid confusion over the new X86_RESCTRL config
Commit-ID: e6d429313ea5c776d2e76b4494df69102e6b7115 Gitweb: https://git.kernel.org/tip/e6d429313ea5c776d2e76b4494df69102e6b7115 Author: Johannes Weiner <[email protected]> AuthorDate: Tue, 29 Jan 2019 17:44:36 -0500 Committer: Borislav Petkov <[email protected]> CommitDate: Sat, 2 Feb 2019 10:34:52 +0100
x86/resctrl: Avoid confusion over the new X86_RESCTRL config
"Resource Control" is a very broad term for this CPU feature, and a term that is also associated with containers, cgroups etc. This can easily cause confusion.
Make the user prompt more specific. Match the config symbol name.
[ bp: In the future, the corresponding ARM arch-specific code will be
under ARM_CPU_RESCTRL and the arch-agnostic bits will be carved out under the CPU_RESCTRL umbrella symbol. ]
--- Documentation/x86/resctrl_ui.txt | 2 +- arch/x86/Kconfig | 6 +++--- arch/x86/include/asm/resctrl_sched.h | 4 ++-- arch/x86/kernel/cpu/Makefile | 2 +- arch/x86/kernel/cpu/resctrl/Makefile | 4 ++-- include/linux/sched.h | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-)
Documentation/x86/resctrl_ui.txt +1 -1
@@ -9,7 +9,7 @@ Fenghua Yu <[email protected]> Tony Luck <[email protected]> Vikas Shivappa <[email protected]> -This feature is enabled by the CONFIG_X86_RESCTRL and the x86 /proc/cpuinfo +This feature is enabled by the CONFIG_X86_CPU_RESCTRL and the x86 /proc/cpuinfo flag bits: RDT (Resource Director Technology) Allocation - "rdt_a" CAT (Cache Allocation Technology) - "cat_l3", "cat_l2"
arch/x86/Kconfig +3 -3
@@ -446,12 +446,12 @@ config RETPOLINE branches. Requires a compiler with -mindirect-branch=thunk-extern support for full protection. The kernel may run slower. -config X86_RESCTRL - bool "Resource Control support" +config X86_CPU_RESCTRL + bool "x86 CPU resource control support" depends on X86 && (CPU_SUP_INTEL || CPU_SUP_AMD) select KERNFS help - Enable Resource Control support. + Enable x86 CPU resource control support. Provide support for the allocation and monitoring of system resources usage by the CPU.
arch/x86/include/asm/resctrl_sched.h +2 -2
@@ -2,7 +2,7 @@#ifndef _ASM_X86_RESCTRL_SCHED_H#define _ASM_X86_RESCTRL_SCHED_H -#ifdef CONFIG_X86_RESCTRL +#ifdef CONFIG_X86_CPU_RESCTRL #include <linux/sched.h> #include <linux/jump_label.h>
@@ -88,6 +88,6 @@ static inline void resctrl_sched_in(void)static inline void resctrl_sched_in (void ) {} -#endif /* CONFIG_X86_RESCTRL */ +#endif /* CONFIG_X86_CPU_RESCTRL */ #endif /* _ASM_X86_RESCTRL_SCHED_H */
arch/x86/kernel/cpu/Makefile +1 -1
@@ -39,7 +39,7 @@ obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o obj-$(CONFIG_X86_MCE) += mce/ obj-$(CONFIG_MTRR) += mtrr/ obj-$(CONFIG_MICROCODE) += microcode/ -obj-$(CONFIG_X86_RESCTRL) += resctrl/ +obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/ obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
arch/x86/kernel/cpu/resctrl/Makefile +2 -2
@@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_X86_RESCTRL) += core.o rdtgroup.o monitor.o -obj-$(CONFIG_X86_RESCTRL) += ctrlmondata.o pseudo_lock.o +obj-$(CONFIG_X86_CPU_RESCTRL) += core.o rdtgroup.o monitor.o +obj-$(CONFIG_X86_CPU_RESCTRL) += ctrlmondata.o pseudo_lock.o CFLAGS_pseudo_lock.o = -I$(src)
include/linux/sched.h +1 -1
@@ -995,7 +995,7 @@ struct task_struct {/* cg_list protected by css_set_lock and tsk->alloc_lock: */ struct list_head cg_list;#endif -#ifdef CONFIG_X86_RESCTRL +#ifdef CONFIG_X86_CPU_RESCTRL u32 closid;u32 rmid;#endif