Skip to content

Commit

Permalink
x86/resctrl: Avoid confusion over the new X86_RESCTRL config
Browse files Browse the repository at this point in the history
"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. ]

Signed-off-by: Johannes Weiner <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Cc: Babu Moger <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Morse <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: [email protected]
Cc: Peter Zijlstra <[email protected]>
Cc: Pu Wen <[email protected]>
Cc: Reinette Chatre <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: x86-ml <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
hnaz authored and suryasaimadhu committed Feb 2, 2019
1 parent 2aa958c commit e6d4293
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Documentation/x86/resctrl_ui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/include/asm/resctrl_sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/cpu/resctrl/Makefile
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6d4293

Please sign in to comment.