powerpc/topology: Introduce llc_override debugfs
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | powerpc/topology: Introduce llc_override debug knobarch/ | +90 | 2 replies | |
| 2/4 | powerpc/topology: Add docs for llc_overrideDocumentation/ Documentation/ | +28 | 0 replies | |
| 3/4 | powerpc/topology: Update mc/pkg flags based on llc_overridearch/ | +40 | 0 replies | |
| 4/4 | powerpc/topology: Rebuild sched domains on llc_override changearch/ | +13 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] powerpc/topology: Introduce llc_override debugfs
There is a new feature in scheduler called as Cache Aware Scheduling [1]. It tries to keep related tasks within the same LLC domain while keeping the system reasonably balanced.
Cache Aware Scheduling assumes that the scheduler LLC domain is large enough to be a useful placement target. This is true on many systems where an LLC spans several cores, but not on PowerPC systems where the scheduler-visible LLC is at the SMT level. In that case, sd_llc_size is effectively the SMT width.
This becomes visible in the capacity check:
return !fits_capacity((mm->sc_stat.nr_running_avg * cpu_smt_num_threads),
scale * per_cpu(sd_llc_size, cpu));As a result, Cache aware scheduling may be enabled but has no room to operate.
Hence provide a debugfs option to set LLC at specific domain so that one can try experiment their workload with cache aware scheduling. This also provides ways to explore it on system with SMT=4 to see if there are any opportunities to improve or uncover bugs if there is any.
Note it is a debug option and it is recommended to keep it disabled. There is no performance guarantees across different values.
[1]: https://lore.kernel.org/all/[email protected]/
Tim, Chenyu, Peter,
Are there any selftest or patches which is used for functional validation of cache aware scheduling? per-LLC occupancy in /proc/{PID}/schedstat may not tell the full story when there are multiple processes and multiple LLC's.
Atleast for functional verification, we might need one if there is not one already. The reason being,
- At present, we may need a custom workload. hackbench/schbench are wakeup intensive and typically bail out even before load balance.
- stress-ng is per process. So doesn't get cache aware scheduling.
- A selftest could spwan specific number of threads till llc size etc and ensure packing happens till core_count(llc_size) by default. This could also be used for tunable verfifications.
- Provide an ability to observe how much of the workload was contained within the LLC due to cache aware scheduling or number of load balances stopped due to preferred llc.
These are some initial thoughts I had. If it sounds ok, I can try to add a new selftest/kunit test.
Shrikanth Hegde (4):
powerpc/topology: Introduce llc_override debug knob powerpc/topology: Add docs for llc_override powerpc/topology: Update mc/pkg flags based on llc_override powerpc/topology: Rebuild sched domains on llc_override change
Documentation/arch/powerpc/index.rst | 1 + Documentation/arch/powerpc/topology.rst | 27 +++++ arch/powerpc/kernel/smp.c | 128 +++++++++++++++++++++++- 3 files changed, 151 insertions(+), 5 deletions(-) create mode 100644 Documentation/arch/powerpc/topology.rst
Signature · 1 line
2.52.0