Skip to content

RFC x86/intel_rdt: Start abstraction for a second arch

James Morse lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest20 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20x86/intel_rdt: Split struct rdt_resourcearch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c +3 more+275 -1990 replies
2/20x86/intel_rdt: Split struct rdt_domainarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c +3 more+127 -880 replies
3/20x86/intel_rdt: Group staged configuration into a separate structarch/x86/kernel/cpu/intel_rdt_ctrlmondata.c include/linux/resctrl.h+43 -170 replies
4/20x86/intel_rdt: Add closid to the staged configarch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c include/linux/resctrl.h+17 -120 replies
5/20x86/intel_rdt: make update_domains() learn the affected closidsarch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c+18 -70 replies
6/20x86/intel_rdt: Add a helper to read a closid's configuration for show_doms()arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c arch/x86/kernel/cpu/intel_rdt_monitor.c include/linux/resctrl.h+17 -50 replies
7/20x86/intel_rdt: Expose update_domains() as an arch helperarch/x86/kernel/cpu/intel_rdt_ctrlmondata.c include/linux/resctrl.h+3 -20 replies
8/20x86/intel_rdt: Make cdp enable/disable globalarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt_rdtgroup.c include/linux/resctrl.h+57 -230 replies
9/20x86/intel_rdt: Track the actual number of closids separatelyarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_rdtgroup.c+18 -60 replies
10/20x86/intel_rdt: Let resctrl change the resources's num_closidarch/x86/kernel/cpu/intel_rdt_rdtgroup.c+21 -10 replies
11/20x86/intel_rdt: Pass in the code/data/both configuration value when parsingarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c +1 more+31 -80 replies
12/20x86/intel_rdt: Correct the closid when staging configuration changesarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +1 more+25 -330 replies
13/20x86/intel_rdt: Allow different CODE/DATA configurations to be stagedarch/x86/kernel/cpu/intel_rdt_ctrlmondata.c include/linux/resctrl.h+5 -30 replies
14/20x86/intel_rdt: Add a separate resource list for resctrlarch/x86/kernel/cpu/intel_rdt_rdtgroup.c include/linux/resctrl.h+57 -10 replies
15/20x86/intel_rdt: Walk the resctrl schema list instead of the arch's resource listarch/x86/kernel/cpu/intel_rdt_ctrlmondata.c arch/x86/kernel/cpu/intel_rdt_rdtgroup.c include/linux/resctrl.h+19 -110 replies
16/20x86/intel_rdt: Move the schemata names into struct resctrl_schemaarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c +2 more+15 -110 replies
17/20x86/intel_rdt: Stop using Lx CODE/DATA resourcesarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_rdtgroup.c+58 -900 replies
18/20x86/intel_rdt: Remove the CODE/DATA illusionary cachesarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h+0 -730 replies
19/20x86/intel_rdt: Kill off alloc_enabledarch/x86/kernel/cpu/intel_rdt.c arch/x86/kernel/cpu/intel_rdt.h arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c +2 more+4 -140 replies
20/20x86/intel_rdt: Merge cdp enable/disable callsarch/x86/kernel/cpu/intel_rdt_rdtgroup.c+12 -370 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 00/20] x86/intel_rdt: Start abstraction for a second arch

Hi folks,

ARM have some upcoming CPU features that are similar to Intel RDT. Resctrl is the defacto ABI for this sort of thing, but it lives under arch/x86.

To get existing software working, we need to make resctrl work with arm64. This series is the first chunk of that. The aim is to move the filesystem/ABI parts into /fs/resctrl, and implement a second arch backend.

What are the ARM features?
Future ARM SoCs may have a feature called MPAM: Memory Partitioning and Monitoring. This is an umbrella term like RDT, and covers a range of controls (like CAT) and monitors (like MBM, CMT).

This series is almost all about CDP. MPAM has equivalent functionality, but it doesn't need enabling, and doesn't affect the available closids. (I'll try and use Intel terms). MPAM expects the equivalent to IA32_PRQ_MSR to be configured with an Instruction closid and a Data closid. These are the same for no-CDP, and different otherwise. There is no need for them to be adjacent.

To avoid emulating CDP in arm64's arch code, this series moves all the ABI parts of the CDP behaviour, (half the closid-space, each having two configurations) into the filesystem parts of resctrl. These will eventually be moved to /fs/.

MPAMs control and monitor configuration is all memory mapped, the base addresses are discovered via firmware tables, so we won't have a table of possible resources that just need alloc_enabling.

Is this it? No... there are another two series of a similar size that abstract the MBM/CMT overflow threads and avoid 'fs' code accessing things that have moved into the 'hw' arch specific struct.

I'm after feedback on the general approach taken here, bugs, as there are certainly subtleties I've missed, and any strong-opinions on what should be arch-specific, and what shouldn't.

This series is based on v4.18, and can be retrieved from:
git://linux-arm.org/linux-jm.git -b mpam/resctrl_rework/rfc_1

Thanks,

James Morse (20):
x86/intel_rdt: Split struct rdt_resource x86/intel_rdt: Split struct rdt_domain
x86/intel_rdt: Group staged configuration into a separate struct x86/intel_rdt: Add closid to the staged config x86/intel_rdt: make update_domains() learn the affected closids x86/intel_rdt: Add a helper to read a closid's configuration for

    show_doms()

x86/intel_rdt: Expose update_domains() as an arch helper x86/intel_rdt: Make cdp enable/disable global x86/intel_rdt: Track the actual number of closids separately x86/intel_rdt: Let resctrl change the resources's num_closid x86/intel_rdt: Pass in the code/data/both configuration value when
parsing
x86/intel_rdt: Correct the closid when staging configuration changes x86/intel_rdt: Allow different CODE/DATA configurations to be staged x86/intel_rdt: Add a separate resource list for resctrl x86/intel_rdt: Walk the resctrl schema list instead of the arch's
resource list
x86/intel_rdt: Move the schemata names into struct resctrl_schema x86/intel_rdt: Stop using Lx CODE/DATA resources x86/intel_rdt: Remove the CODE/DATA illusionary caches x86/intel_rdt: Kill off alloc_enabled
x86/intel_rdt: Merge cdp enable/disable calls

 arch/x86/kernel/cpu/intel_rdt.c             | 298 +++++++-------------
 arch/x86/kernel/cpu/intel_rdt.h             | 161 ++++-------
 arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c | 142 +++++++---
 arch/x86/kernel/cpu/intel_rdt_monitor.c     |  78 ++---
 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c    | 216 +++++++++-----
 include/linux/resctrl.h                     | 166 +++++++++++
 6 files changed, 621 insertions(+), 440 deletions(-)
 create mode 100644 include/linux/resctrl.h
Signature · 1 line
2.18.0