Skip to contentSkip to conversation

x86/cache updates for 4.14

GIT PULL Thomas Gleixner 1 participant 1 message Sep 4, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest x86-cache-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-cache-for-linus

This update provides a complete rewrite of the Cache Quality Monitoring (CQM) facility.

The existing CQM support was duct taped into perf with a lot of issues and the attempts to fix those turned out to be incomplete and horrible.

After lengthy discussions it was decided to integrate the CQM support into the Resource Director Technology (RDT) facility, which is the obvious choise as in hardware CQM is part of RDT. This allowed to add Memory Bandwidth Monitoring support on top.

As a result the mechanisms for allocating cache/memory bandwidth and the corresponding monitoring mechanisms are integrated into a single management facility with a consistent user interface.

Thanks,

tglx

------------------>
Colin Ian King (1):
x86/intel_rdt: Remove redundant ternary operator on return

Fenghua Yu (1):
x86/intel_rdt: Show bitmask of shareable resource with other executing units

Reinette Chatre (1):
x86/intel_rdt: Mark rdt_root and closid_alloc as static

Tony Luck (5):
x86/intel_rdt: Simplify info and base file lists x86/intel_rdt/mbm: Basic counting of MBM events (total and local) x86/intel_rdt: Move special case code for Haswell to a quirk function x86/intel_rdt: Add command line options for resource director technology x86/intel_rdt: Turn off most RDT features on Skylake

Vikas Shivappa (29):
x86/perf/cqm: Wipe out perf based cqm x86/intel_rdt/cqm: Documentation for resctrl based RDT Monitoring x86/intel_rdt: Introduce a common compile option for RDT x86/intel_rdt: Change file names to accommodate RDT monitor code x86/intel_rdt: Cleanup namespace to support RDT monitoring x86/intel_rdt: Make rdt_resources_all more readable x86/intel_rdt/cqm: Add RDT monitoring initialization x86/intel_rdt/cqm: Add RMID (Resource monitoring ID) management x86/intel_rdt/cqm: Add info files for RDT monitoring x86/intel_rdt: Prepare for RDT monitoring mkdir support x86/intel_rdt/cqm: Add mkdir support for RDT monitoring x86/intel_rdt: Change closid type from int to u32 x86/intel_rdt/cqm: Add tasks file support x86/intel_rdt: Prepare to add RDT monitor cpus file support x86/intel_rdt/cqm: Add cpus file support x86/intel_rdt: Prepare for RDT monitor data support x86/intel_rdt/cqm: Add mon_data
x86/intel_rdt: Separate the ctrl bits from rmdir x86/intel_rdt/cqm: Add rmdir support x86/intel_rdt/cqm: Add mount,umount support x86/intel_rdt: Introduce rdt_enable_key for scheduling x86/intel_rdt/cqm: Add sched_in support x86/intel_rdt/cqm: Add CPU hotplug support x86/intel_rdt/mbm: Add mbm counter initialization x86/intel_rdt/mbm: Handle counter overflow x86/intel_rdt/cqm: Clear the default RMID during hotcpu x86/intel_rdt: Modify the intel_pqr_state for better performance x86/intel_rdt/mbm: Fix MBM overflow handler during CPU hotplug x86/intel_rdt/cqm: Improve limbo list processing

 Documentation/admin-guide/kernel-parameters.rst    |    1 +
 Documentation/admin-guide/kernel-parameters.txt    |    6 +
 Documentation/x86/intel_rdt_ui.txt                 |  323 +++-
 MAINTAINERS                                        |    2 +-
 arch/x86/Kconfig                                   |   12 +-
 arch/x86/events/intel/Makefile                     |    2 +-
 arch/x86/events/intel/cqm.c                        | 1766 --------------------
 arch/x86/include/asm/intel_rdt.h                   |  286 ----
 arch/x86/include/asm/intel_rdt_common.h            |   27 -
 arch/x86/include/asm/intel_rdt_sched.h             |   92 +
 arch/x86/kernel/cpu/Makefile                       |    2 +-
 arch/x86/kernel/cpu/intel_rdt.c                    |  375 ++++-
 arch/x86/kernel/cpu/intel_rdt.h                    |  440 +++++
 ...ntel_rdt_schemata.c => intel_rdt_ctrlmondata.c} |   67 +-
 arch/x86/kernel/cpu/intel_rdt_monitor.c            |  499 ++++++
 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c           | 1131 ++++++++++---
 arch/x86/kernel/process_32.c                       |    2 +-
 arch/x86/kernel/process_64.c                       |    2 +-
 include/linux/perf_event.h                         |   18 -
 include/linux/sched.h                              |    5 +-
 kernel/events/core.c                               |   14 +-
 21 files changed, 2638 insertions(+), 2434 deletions(-)
 delete mode 100644 arch/x86/events/intel/cqm.c
 delete mode 100644 arch/x86/include/asm/intel_rdt.h
 delete mode 100644 arch/x86/include/asm/intel_rdt_common.h
 create mode 100644 arch/x86/include/asm/intel_rdt_sched.h
 create mode 100644 arch/x86/kernel/cpu/intel_rdt.h
 rename arch/x86/kernel/cpu/{intel_rdt_schemata.c => intel_rdt_ctrlmondata.c} (82%)
 create mode 100644 arch/x86/kernel/cpu/intel_rdt_monitor.c
Documentation/admin-guide/kernel-parameters.rst +1 -0
index d76ab3907e2b..b2598cc9834c 100644
@@ -138,6 +138,7 @@ parameter is applicable::
 	PPT	Parallel port support is enabled.
 	PS2	Appropriate PS/2 support is enabled.
 	RAM	RAM disk support is enabled.
+	RDT	Intel Resource Director Technology.
 	S390	S390 architecture is enabled.
 	SCSI	Appropriate SCSI support is enabled.
 			A lot of drivers have their options described inside
Documentation/admin-guide/kernel-parameters.txt +6 -0
index d9c171ce4190..ef52ae4ed6e8 100644
@@ -3598,6 +3598,12 @@
 			Run specified binary instead of /init from the ramdisk,
 			used for early userspace startup. See initrd.
 
+	rdt=		[HW,X86,RDT]
+			Turn on/off individual RDT features. List is:
+			cmt, mbmtotal, mbmlocal, l3cat, l3cdp, l2cat, mba.
+			E.g. to turn on cmt and turn off mba use:
+				rdt=cmt,!mba
+
 	reboot=		[KNL]
 			Format (x86 or x86_64):
 				[w[arm] | c[old] | h[ard] | s[oft] | g[pio]] \
Documentation/x86/intel_rdt_ui.txt +285 -38

392 lines not on this page · raw message

MAINTAINERS +1 -1
index f66488dfdbc9..cbbc79a81dea 100644
@@ -11103,7 +11103,7 @@ M:	Fenghua Yu <[email protected]>
 L:	[email protected]
 S:	Supported
 F:	arch/x86/kernel/cpu/intel_rdt*
-F:	arch/x86/include/asm/intel_rdt*
+F:	arch/x86/include/asm/intel_rdt_sched.h
 F:	Documentation/x86/intel_rdt*
 
 READ-COPY UPDATE (RCU)
arch/x86/Kconfig +6 -6
index 781521b7cf9e..b1abda70c2d1 100644
@@ -424,16 +424,16 @@ config GOLDFISH
        def_bool y
        depends on X86_GOLDFISH
 
-config INTEL_RDT_A
-	bool "Intel Resource Director Technology Allocation support"
+config INTEL_RDT
+	bool "Intel Resource Director Technology support"
 	default n
 	depends on X86 && CPU_SUP_INTEL
 	select KERNFS
 	help
-	  Select to enable resource allocation which is a sub-feature of
-	  Intel Resource Director Technology(RDT). More information about
-	  RDT can be found in the Intel x86 Architecture Software
-	  Developer Manual.
+	  Select to enable resource allocation and monitoring which are
+	  sub-features of Intel Resource Director Technology(RDT). More
+	  information about RDT can be found in the Intel x86
+	  Architecture Software Developer Manual.
 
 	  Say N if unsure.
 
arch/x86/events/intel/Makefile +1 -1
index 06c2baa51814..e9d8520a801a 100644
@@ -1,4 +1,4 @@
-obj-$(CONFIG_CPU_SUP_INTEL)		+= core.o bts.o cqm.o
+obj-$(CONFIG_CPU_SUP_INTEL)		+= core.o bts.o
 obj-$(CONFIG_CPU_SUP_INTEL)		+= ds.o knc.o
 obj-$(CONFIG_CPU_SUP_INTEL)		+= lbr.o p4.o p6.o pt.o
 obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL)	+= intel-rapl-perf.o
arch/x86/events/intel/cqm.c deleted +0 -1766

1,766 lines not on this page · raw message

arch/x86/include/asm/intel_rdt.h deleted +0 -286

286 lines not on this page · raw message

arch/x86/include/asm/intel_rdt_common.h deleted +0 -27
deleted file mode 100644
index b31081b89407..000000000000
@@ -1,27 +0,0 @@
-#ifndef _ASM_X86_INTEL_RDT_COMMON_H
-#define _ASM_X86_INTEL_RDT_COMMON_H
-
-#define MSR_IA32_PQR_ASSOC	0x0c8f
-
-/**
- * struct intel_pqr_state - State cache for the PQR MSR
- * @rmid:		The cached Resource Monitoring ID
- * @closid:		The cached Class Of Service ID
- * @rmid_usecnt:	The usage counter for rmid
- *
- * The upper 32 bits of MSR_IA32_PQR_ASSOC contain closid and the
- * lower 10 bits rmid. The update to MSR_IA32_PQR_ASSOC always
- * contains both parts, so we need to cache them.
- *
- * The cache also helps to avoid pointless updates if the value does
- * not change.
- */
-struct intel_pqr_state {
-	u32			rmid;
-	u32			closid;
-	int			rmid_usecnt;
-};
-
-DECLARE_PER_CPU(struct intel_pqr_state, pqr_state);
-
-#endif /* _ASM_X86_INTEL_RDT_COMMON_H */
arch/x86/include/asm/intel_rdt_sched.h new file +92 -0

92 lines not on this page · raw message

arch/x86/kernel/cpu/Makefile +1 -1
index cdf82492b770..e17942c131c8 100644
@@ -33,7 +33,7 @@ obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
 obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
 obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
 
-obj-$(CONFIG_INTEL_RDT_A)	+= intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_schemata.o
+obj-$(CONFIG_INTEL_RDT)	+= intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_monitor.o intel_rdt_ctrlmondata.o
 
 obj-$(CONFIG_X86_MCE)			+= mcheck/
 obj-$(CONFIG_MTRR)			+= mtrr/
arch/x86/kernel/cpu/intel_rdt.c +314 -61

375 lines not on this page · raw message

arch/x86/kernel/cpu/intel_rdt.h new file +440 -0

440 lines not on this page · raw message

arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c renamed from arch/x86/kernel/cpu/intel_rdt_schemata.c +61 -6

67 lines not on this page · raw message

arch/x86/kernel/cpu/intel_rdt_monitor.c new file +499 -0

499 lines not on this page · raw message

arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +925 -206

1,131 lines not on this page · raw message

arch/x86/kernel/process_32.c +1 -1
index c6d6dc5f8bb2..22802162eeb9 100644

Lines of this file are not shown. View the raw message.

arch/x86/kernel/process_64.c +1 -1
index c3169be4c596..77a35c817b2b 100644

Lines of this file are not shown. View the raw message.

include/linux/perf_event.h +0 -18
index a3b873fc59e4..4572dbabd4e8 100644

Lines of this file are not shown. View the raw message.

include/linux/sched.h +3 -2
index 8337e2db0bb2..067a41ac5fd4 100644

Lines of this file are not shown. View the raw message.

kernel/events/core.c +1 -13
index 426c2ffba16d..6e171540c0af 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.