aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines
diff options
context:
space:
mode:
authorWanpeng Li <[email protected]>2020-01-13 08:50:27 +0800
committerIngo Molnar <[email protected]>2020-01-28 21:36:57 +0100
commite938b9c94164e4d981039f1cf6007d7453883e5a (patch)
tree3ce4be9bc827fb32bd2ca38d71a5d6f601d5fe69 /tools/perf/util/scripting-engines
parentb562d140649966d4daedd0483a8fe59ad3bb465a (diff)
sched/nohz: Optimize get_nohz_timer_target()
On a machine, CPU 0 is used for housekeeping, the other 39 CPUs in the same socket are in nohz_full mode. We can observe huge time burn in the loop for seaching nearest busy housekeeper cpu by ftrace. 2) | get_nohz_timer_target() { 2) 0.240 us | housekeeping_test_cpu(); 2) 0.458 us | housekeeping_test_cpu(); ... 2) 0.292 us | housekeeping_test_cpu(); 2) 0.240 us | housekeeping_test_cpu(); 2) 0.227 us | housekeeping_any_cpu(); 2) + 43.460 us | } This patch optimizes the searching logic by finding a nearest housekeeper CPU in the housekeeping cpumask, it can minimize the worst searching time from ~44us to < 10us in my testing. In addition, the last iterated busy housekeeper can become a random candidate while current CPU is a better fallback if it is a housekeeper. Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/scripting-engines')
0 files changed, 0 insertions, 0 deletions