Skip to content

x86/resctrl: Move the resctrl filesystem code to /fs/resctrl

James Morse lkml 1 version Applied

Status from this message: The following commit has been merged into the x86/cache branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest30 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/30x86/resctrl: Fix allocation of cleanest CLOSID on platforms with no monitorsarch/x86/kernel/cpu/resctrl/rdtgroup.c+2 -10 replies
2/30x86/resctrl: Add a helper to avoid reaching into the arch code resource listarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/internal.h +3 more+39 -240 replies
3/30x86/resctrl: Remove fflags from struct rdt_resourcearch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/rdtgroup.c include/linux/resctrl.h+16 -80 replies
4/30x86/resctrl: Use schema type to determine how to parse schema valuesarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/internal.h +1 more+43 -240 replies
5/30x86/resctrl: Use schema type to determine the schema format stringarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/rdtgroup.c +1 more+17 -70 replies
6/30x86/resctrl: Remove data_width and the tabular formatarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/internal.h +2 more+10 -330 replies
7/30x86/resctrl: Add max_bw to struct resctrl_membwarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c include/linux/resctrl.h+6 -20 replies
8/30x86/resctrl: Generate default_ctrl instead of sharing itarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/rdtgroup.c +1 more+28 -151 reply
9/30x86/resctrl: Add helper for setting CPU default propertiesarch/x86/include/asm/resctrl.h arch/x86/kernel/cpu/resctrl/rdtgroup.c+25 -90 replies
10/30x86/resctrl: Remove rdtgroup from update_cpu_closid_rmid()arch/x86/kernel/cpu/resctrl/rdtgroup.c include/linux/resctrl.h+35 -40 replies
11/30x86/resctrl: Expose resctrl fs's init function to the rest of the kernelarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/monitor.c +2 more+14 -140 replies
12/30x86/resctrl: Move rdt_find_domain() to be visible to arch and fs codearch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/internal.h +1 more+41 -370 replies
13/30x86/resctrl: Move resctrl types to a separate headerMAINTAINERS arch/x86/include/asm/resctrl.h arch/x86/kernel/cpu/resctrl/internal.h +2 more+57 -440 replies
14/30x86/resctrl: Add an arch helper to reset one resourcearch/x86/kernel/cpu/resctrl/rdtgroup.c include/linux/resctrl.h+14 -40 replies
15/30x86/resctrl: Move monitor exit work to a resctrl exit callarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/monitor.c +1 more+12 -90 replies
16/30x86/resctrl: Move monitor init work to a resctrl init callarch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/monitor.c arch/x86/kernel/cpu/resctrl/rdtgroup.c+54 -110 replies
17/30x86/resctrl: Rewrite and move the for_each_*_rdt_resource() walkersarch/x86/kernel/cpu/resctrl/internal.h include/linux/resctrl.h+18 -290 replies
18/30x86/resctrl: Move the is_mbm_*_enabled() helpers to asm/resctrl.harch/x86/include/asm/resctrl.h arch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c +3 more+56 -550 replies
19/30x86/resctrl: Add resctrl_arch_is_evt_configurable() to abstract BMECarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/monitor.c include/linux/resctrl.h+28 -110 replies
20/30x86/resctrl: Change mon_event_config_{read,write}() to be arch helpersarch/x86/kernel/cpu/resctrl/rdtgroup.c include/linux/resctrl.h+54 -230 replies
21/30x86/resctrl: Move mba_mbps_default_event init to filesystem codearch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/monitor.c+5 -50 replies
22/30x86/resctrl: Move mbm_cfg_mask to struct rdt_resourcearch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/monitor.c arch/x86/kernel/cpu/resctrl/rdtgroup.c +1 more+6 -72 replies
23/30x86/resctrl: Add resctrl_arch_ prefix to pseudo lock functionsarch/x86/include/asm/resctrl.h arch/x86/kernel/cpu/resctrl/pseudo_lock.c+24 -170 replies
24/30x86/resctrl: Allow an architecture to disable pseudo lockarch/x86/Kconfig arch/x86/kernel/cpu/resctrl/Makefile arch/x86/kernel/cpu/resctrl/internal.h +1 more+53 -110 replies
25/30x86/resctrl: Make prefetch_disable_bits belong to the arch codearch/x86/kernel/cpu/resctrl/pseudo_lock.c+8 -50 replies
26/30x86/resctrl: Make resctrl_arch_pseudo_lock_fn() take a plrarch/x86/include/asm/resctrl.h arch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/pseudo_lock.c +1 more+46 -440 replies
27/30x86/resctrl: Move RFTYPE flags to be managed by resctrlarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/rdtgroup.c+12 -30 replies
28/30x86/resctrl: Handle throttle_mode for SMBA resourcesarch/x86/kernel/cpu/resctrl/rdtgroup.c+27 -60 replies
29/30x86/resctrl: Move get_config_index() to a headerarch/x86/kernel/cpu/resctrl/ctrlmondata.c include/linux/resctrl.h+18 -160 replies
30/30x86/resctrl: Move get_{mon,ctrl}_domain_from_cpu() to live with their callersarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/monitor.c +1 more+32 -320 replies

Reviews trailers per patch

All 30 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchCarl WorthShaopeng TanPeter NewmanAmit Singh TomarShanker DonthineniBabu MogerDavid HildenbrandReinette ChatreTony LuckFenghua Yu
SeriesT-b R-b T-b R-b
1/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b R-b
2/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
3/30T-b R-b T-b T-b T-b T-b R-b R-b R-b
4/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
5/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
6/30T-b R-b T-b T-b T-b T-b R-b R-b R-b
7/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
8/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
9/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
10/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
11/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
12/30T-b T-b T-b T-b T-b R-b R-b
13/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
14/30T-b T-b T-b T-b T-b R-b R-b R-b
15/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
16/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
17/30T-b R-b T-b T-b T-b T-b R-b R-b R-b
18/30T-b T-b T-b T-b T-b T-b R-b R-b R-b
19/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
20/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
21/30T-b T-b T-b T-b T-b R-b R-b
22/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b R-b
23/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
24/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
25/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
26/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
27/30T-b T-b T-b T-b T-b R-b R-b
28/30T-b T-b T-b T-b T-b R-b R-b
29/30T-b T-b R-b T-b T-b T-b T-b R-b R-b R-b
30/30T-b T-b T-b T-b T-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.

Read the v1 thread

Cover letter [PATCH v8:for-boris 00/30] x86/resctrl: Move the resctrl filesystem code to /fs/resctrl

Changes since v7?:
* Series split to the first 30 patches, requested by Boris.
* Fixed stale function names, definitions/declartions and typos.
* Dropped the use of the default ctrlval helper in cache_alloc_hsw_probe()

As ever, changes are noted on each patch.
---
This series renames functions and moves code around. With the exception of invalid configurations for the configurable-events, there should be no changes in behaviour caused by this series. It is now possible for throttle_mode to report 'undefined', but no known platform will do this.

The driving pattern is to make things like struct rdtgroup private to resctrl. Features like pseudo-lock aren't going to work on arm64, the ability to disable it at compile time is added.

All this is to allow the filesystem portions of resctrl to be moved to live in /fs/, which allows resctrl to be supported by other architecture, such as arm64's MPAM. (What's MPAM? See the cover letter of the first series. [1])

This series is based on v6.14-rc3 and can be retrieved from:
https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/move_to_fs/v8_for_boris

As ever - bugs welcome,
Thanks,

James

[v7] https://lore.kernel.org/lkml/[email protected]
[v6] https://lore.kernel.org/lkml/[email protected]/
[v5] https://lore.kernel.org/r/[email protected]
[v4] https://lore.kernel.org/all/[email protected]/
[v3] https://lore.kernel.org/r/[email protected]
[v2] https://lore.kernel.org/r/[email protected]
[v1] https://lore.kernel.org/r/[email protected]
[1] https://lore.kernel.org/lkml/[email protected]/

James Morse (30):
x86/resctrl: Fix allocation of cleanest CLOSID on platforms with no
monitors
x86/resctrl: Add a helper to avoid reaching into the arch code
resource list
x86/resctrl: Remove fflags from struct rdt_resource x86/resctrl: Use schema type to determine how to parse schema values x86/resctrl: Use schema type to determine the schema format string x86/resctrl: Remove data_width and the tabular format x86/resctrl: Add max_bw to struct resctrl_membw x86/resctrl: Generate default_ctrl instead of sharing it x86/resctrl: Add helper for setting CPU default properties x86/resctrl: Remove rdtgroup from update_cpu_closid_rmid() x86/resctrl: Expose resctrl fs's init function to the rest of the
kernel
x86/resctrl: Move rdt_find_domain() to be visible to arch and fs code x86/resctrl: Move resctrl types to a separate header x86/resctrl: Add an arch helper to reset one resource x86/resctrl: Move monitor exit work to a resctrl exit call x86/resctrl: Move monitor init work to a resctrl init call x86/resctrl: Rewrite and move the for_each_*_rdt_resource() walkers x86/resctrl: Move the is_mbm_*_enabled() helpers to asm/resctrl.h x86/resctrl: Add resctrl_arch_is_evt_configurable() to abstract BMEC x86/resctrl: Change mon_event_config_{read,write}() to be arch helpers x86/resctrl: Move mba_mbps_default_event init to filesystem code x86/resctrl: Move mbm_cfg_mask to struct rdt_resource x86/resctrl: Add resctrl_arch_ prefix to pseudo lock functions x86/resctrl: Allow an architecture to disable pseudo lock x86/resctrl: Make prefetch_disable_bits belong to the arch code x86/resctrl: Make resctrl_arch_pseudo_lock_fn() take a plr x86/resctrl: Move RFTYPE flags to be managed by resctrl x86/resctrl: Handle throttle_mode for SMBA resources x86/resctrl: Move get_config_index() to a header x86/resctrl: Move get_{mon,ctrl}_domain_from_cpu() to live with their
callers

 MAINTAINERS                               |   1 +
 arch/x86/Kconfig                          |   7 +
 arch/x86/include/asm/resctrl.h            |  36 ++-
 arch/x86/kernel/cpu/resctrl/Makefile      |   5 +-
 arch/x86/kernel/cpu/resctrl/core.c        | 181 ++++----------
 arch/x86/kernel/cpu/resctrl/ctrlmondata.c |  93 ++++---
 arch/x86/kernel/cpu/resctrl/internal.h    | 201 ++++-----------
 arch/x86/kernel/cpu/resctrl/monitor.c     | 119 ++++++---
 arch/x86/kernel/cpu/resctrl/pseudo_lock.c |  55 +++--
 arch/x86/kernel/cpu/resctrl/rdtgroup.c    | 284 ++++++++++++++++------
 include/linux/resctrl.h                   | 212 ++++++++++++++--
 include/linux/resctrl_types.h             |  54 ++++
 12 files changed, 769 insertions(+), 479 deletions(-)
 create mode 100644 include/linux/resctrl_types.h
Signature · 1 line
2.39.5