x86/CPU and x86/resctrl: Support pseudo-lock regions spanning L2 and L3 cache
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest10 patches 31 repliesIn review
- 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 files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | x86/CPU: Expose if cache is inclusive of lower level cachesarch/ include/ | +42 | 19 replies | |
| 2/10 | x86/resctrl: Remove unnecessary size computearch/ | +2 | 0 replies | |
| 3/10 | x86/resctrl: Constrain C-states during pseudo-lock region initarch/ | +16 | 0 replies | |
| 4/10 | x86/resctrl: Set cache line size using new utilityarch/ | +31 | 1 reply | |
| 5/10 | x86/resctrl: Associate pseudo-locked region's cache instance by idarch/ arch/ arch/ +2 more | +40 | 0 replies | |
| 6/10 | x86/resctrl: Introduce utility to return pseudo-locked cache portionarch/ arch/ | +24 | 1 reply | |
| 7/10 | x86/resctrl: Remove unnecessary pointer to pseudo-locked regionarch/ arch/ arch/ +1 more | +32 | 0 replies | |
| 8/10 | x86/resctrl: Support pseudo-lock regions spanning resourcesarch/ arch/ arch/ +1 more | +211 | 2 replies | |
| 9/10 | x86/resctrl: Pseudo-lock portions of multiple resourcesarch/ | +139 | 6 replies | |
| 10/10 | x86/resctrl: Only pseudo-lock L3 cache when inclusivearch/ | +35 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
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