Skip to content

x86/CPU and x86/resctrl: Support pseudo-lock regions spanning L2 and L3 cache

Reinette Chatre lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 31 repliesIn review
  2. v110 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Rebase onto v5.3-rc2

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10x86/CPU: Expose if cache is inclusive of lower level cachesarch/x86/kernel/cpu/cacheinfo.c include/linux/cacheinfo.h+42 -419 replies
2/10x86/resctrl: Remove unnecessary size computearch/x86/kernel/cpu/resctrl/rdtgroup.c+2 -40 replies
3/10x86/resctrl: Constrain C-states during pseudo-lock region initarch/x86/kernel/cpu/resctrl/pseudo_lock.c+16 -140 replies
4/10x86/resctrl: Set cache line size using new utilityarch/x86/kernel/cpu/resctrl/pseudo_lock.c+31 -111 reply
5/10x86/resctrl: Associate pseudo-locked region's cache instance by idarch/x86/kernel/cpu/resctrl/core.c arch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/internal.h +2 more+40 -440 replies
6/10x86/resctrl: Introduce utility to return pseudo-locked cache portionarch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/pseudo_lock.c+24 -01 reply
7/10x86/resctrl: Remove unnecessary pointer to pseudo-locked regionarch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/pseudo_lock.c +1 more+32 -310 replies
8/10x86/resctrl: Support pseudo-lock regions spanning resourcesarch/x86/kernel/cpu/resctrl/ctrlmondata.c arch/x86/kernel/cpu/resctrl/internal.h arch/x86/kernel/cpu/resctrl/pseudo_lock.c +1 more+211 -712 replies
9/10x86/resctrl: Pseudo-lock portions of multiple resourcesarch/x86/kernel/cpu/resctrl/pseudo_lock.c+139 -36 replies
10/10x86/resctrl: Only pseudo-lock L3 cache when inclusivearch/x86/kernel/cpu/resctrl/pseudo_lock.c+35 -00 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH V2 00/10] x86/CPU and x86/resctrl: Support pseudo-lock regions spanning L2 and L3 cache

Changes since V1:
- Rebase onto v5.3-rc2

Dear Maintainers,

Cache pseudo-locking involves preloading a region of physical memory into a reserved portion of cache that no task or CPU can subsequently fill into and from that point on will only serve cache hits. At this time it is only possible to create cache pseudo-locked regions in either L2 or L3 cache, supporting systems that support either L2 Cache Allocation Technology (CAT) or L3 CAT because CAT is the mechanism used to manage reservations of cache portions.

This series introduces support for cache pseudo-locked regions that can span L2 and L3 cache in preparation for systems that may support CAT on L2 and L3 cache. Only systems with L3 inclusive cache is supported at this time because if the L3 cache is not inclusive then pseudo-locked memory within the L3 cache would be evicted when migrated to L2. Because of this constraint the first patch in this series introduces support in cacheinfo.c for resctrl to discover if the L3 cache is inclusive. All other patches in this series are to the resctrl subsystem.

In support of cache pseudo-locked regions spanning L2 and L3 cache the term "cache pseudo-lock portion" is introduced. Each portion of a cache pseudo-locked region spans one level of cache and a cache pseudo-locked region can be made up of one or two cache pseudo-lock portions.

On systems supporting L2 and L3 CAT where L3 cache is inclusive it is possible to create two types of pseudo-locked regions:
1) A pseudo-locked region spanning just L3 cache, consisting out of a single pseudo-locked portion.
2) A pseudo-locked region spanning L2 and L3 cache, consisting out of two pseudo-locked portions.

In an L3 inclusive cache system a L2 pseudo-locked portion is required to be matched with an L3 pseudo-locked portion to prevent a cache line from being evicted from L2 when it is evicted from L3.

Patches 2 to 8 to the resctrl subsystem are preparing for the new feature and should result in no functional change, but some comments do refer to the new feature. Support for pseudo-locked regions spanning L2 and L3 cache is introduced in patches 9 and 10.

Your feedback will be greatly appreciated.

Regards,

Reinette

Reinette Chatre (10):
x86/CPU: Expose if cache is inclusive of lower level caches x86/resctrl: Remove unnecessary size compute
x86/resctrl: Constrain C-states during pseudo-lock region init x86/resctrl: Set cache line size using new utility x86/resctrl: Associate pseudo-locked region's cache instance by id x86/resctrl: Introduce utility to return pseudo-locked cache portion x86/resctrl: Remove unnecessary pointer to pseudo-locked region x86/resctrl: Support pseudo-lock regions spanning resources x86/resctrl: Pseudo-lock portions of multiple resources x86/resctrl: Only pseudo-lock L3 cache when inclusive

 arch/x86/kernel/cpu/cacheinfo.c           |  42 +-
 arch/x86/kernel/cpu/resctrl/core.c        |   7 -
 arch/x86/kernel/cpu/resctrl/ctrlmondata.c |  37 +-
 arch/x86/kernel/cpu/resctrl/internal.h    |  39 +-
 arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 444 +++++++++++++++++++---
 arch/x86/kernel/cpu/resctrl/rdtgroup.c    |  61 ++-
 include/linux/cacheinfo.h                 |   4 +
 7 files changed, 512 insertions(+), 122 deletions(-)
Signature · 1 line
2.17.2