summaryrefslogtreecommitdiff
path: root/kernel/sched/sched.h
diff options
context:
space:
mode:
authorAdam Li <adamli@os.amperecomputing.com>2025-10-11 06:43:22 +0000
committerPeter Zijlstra <peterz@infradead.org>2025-10-16 11:13:50 +0200
commit82d6e01a0699800efd8b048eb584c907ccb47b7a (patch)
treea7c66ade6beb0ba283a70d0500440829d8baa5e1 /kernel/sched/sched.h
parent4d6dd05d07d00bc3bd91183dab4d75caa8018db9 (diff)
sched/fair: Only update stats for allowed CPUs when looking for dst group
Load imbalance is observed when the workload frequently forks new threads. Due to CPU affinity, the workload can run on CPU 0-7 in the first group, and only on CPU 8-11 in the second group. CPU 12-15 are always idle. { 0 1 2 3 4 5 6 7 } {8 9 10 11 12 13 14 15} * * * * * * * * * * * * When looking for dst group for newly forked threads, in many times update_sg_wakeup_stats() reports the second group has more idle CPUs than the first group. The scheduler thinks the second group is less busy. Then it selects least busy CPUs among CPU 8-11. Therefore CPU 8-11 can be crowded with newly forked threads, at the same time CPU 0-7 can be idle. A task may not use all the CPUs in a schedule group due to CPU affinity. Only update schedule group statistics for allowed CPUs. Signed-off-by: Adam Li <adamli@os.amperecomputing.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'kernel/sched/sched.h')
0 files changed, 0 insertions, 0 deletions