diff options
author | Peter Zijlstra (Intel) <[email protected]> | 2020-04-16 07:47:44 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2020-04-22 23:10:13 +0200 |
commit | b56e7d45e80796ca963ac10902245b244d823caf (patch) | |
tree | 00298f610650324771aa2eec2ebbba47f5fd8cdb /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 23ccee22e834eca236b9a20989caf6905bd6954a (diff) |
x86, sched: Don't enable static key when starting secondary CPUs
The static key arch_scale_freq_key only needs to be enabled once (at
boot). This change fixes a bug by which the key was enabled every time cpu0
is started, even as a secondary CPU during cpu hotplug. Secondary CPUs are
started from the idle thread: setting a static key from there means
acquiring a lock and may result in sleeping in the idle task, causing CPU
lockup.
Another consequence of this change is that init_counter_refs() is now
called on each CPU correctly; previously the function on_each_cpu() was
used, but it was called at boot when the only online cpu is cpu0.
[[email protected]: Tested and wrote changelog]
Fixes: 1567c3e3467c ("x86, sched: Add support for frequency invariance")
Reported-by: Chris Wilson <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Giovanni Gherdovich <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions