[PATCH v6 0/4] sched/fair: Improve scan efficiency of SIS
From: Abel Wu
Date: Wed Oct 19 2022 - 08:48:18 EST
This patchset tries to improve SIS scan efficiency by recording idle
cpus in a cpumask for each LLC which will be used as a target cpuset
in the domain scan. The cpus are recorded at CORE granule to avoid
tasks being stack on same core.
v5 -> v6:
- Rename SIS_FILTER to SIS_CORE as it can only be activated when
SMT is enabled and better describes the behavior of CORE granule
update & load delivery.
- Removed the part of limited scan for idle cores since it might be
better to open another thread to discuss the strategies such as
limited or scaled depth. But keep the part of full scan for idle
cores when LLC is overloaded because SIS_CORE can greatly reduce
the overhead of full scan in such case.
- Removed the state of sd_is_busy which indicates an LLC is fully
busy and we can safely skip the SIS domain scan. I would prefer
leave this to SIS_UTIL.
- The filter generation mechanism is replaced by in-place updates
during domain scan to better deal with partial scan failures.
- Collect Reviewed-bys from Tim Chen
v4 -> v5:
- Add limited scan for idle cores when overloaded, suggested by Mel
- Split out several patches since they are irrelevant to this scope
- Add quick check on ttwu_pending before core update
- Wrap the filter into SIS_FILTER feature, suggested by Chen Yu
- Move the main filter logic to the idle path, because the newidle
balance can bail out early if rq->avg_idle is small enough and
lose chances to update the filter.
v3 -> v4:
- Update filter in load_balance rather than in the tick
- Now the filter contains unoccupied cpus rather than overloaded ones
- Added mechanisms to deal with the false positive cases
v2 -> v3:
- Removed sched-idle balance feature and focus on SIS
- Take non-CFS tasks into consideration
- Several fixes/improvement suggested by Josh Don
v1 -> v2:
- Several optimizations on sched-idle balancing
- Ignore asym topos in can_migrate_task
- Add more benchmarks including SIS efficiency
- Re-organize patch as suggested by Mel Gorman
Abel Wu (4):
sched/fair: Skip core update if task pending
sched/fair: Ignore SIS_UTIL when has_idle_core
sched/fair: Introduce SIS_CORE
sched/fair: Deal with SIS scan failures
include/linux/sched/topology.h | 15 ++++
kernel/sched/fair.c | 122 +++++++++++++++++++++++++++++----
kernel/sched/features.h | 7 ++
kernel/sched/sched.h | 3 +
kernel/sched/topology.c | 8 ++-
5 files changed, 141 insertions(+), 14 deletions(-)
--
2.37.3