diff options
author | Libo Chen <libo.chen@oracle.com> | 2022-08-11 01:33:13 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-04-05 10:58:48 +0300 |
commit | 39afe5d6fc59237ff7738bf3ede5a8856822d59d (patch) | |
tree | 8d2237292b8828d8165b59f790f5a6a75207f318 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 05bfb338fa8dd40b008ce443e397fc374f6bd107 (diff) | |
download | linux-39afe5d6fc59237ff7738bf3ede5a8856822d59d.tar.xz |
sched/fair: Fix inaccurate tally of ttwu_move_affine
There are scenarios where non-affine wakeups are incorrectly counted as
affine wakeups by schedstats.
When wake_affine_idle() returns prev_cpu which doesn't equal to
nr_cpumask_bits, it will slip through the check: target == nr_cpumask_bits
in wake_affine() and be counted as if target == this_cpu in schedstats.
Replace target == nr_cpumask_bits with target != this_cpu to make sure
affine wakeups are accurately tallied.
Fixes: 806486c377e33 (sched/fair: Do not migrate if the prev_cpu is idle)
Suggested-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Libo Chen <libo.chen@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Link: https://lore.kernel.org/r/20220810223313.386614-1-libo.chen@oracle.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions