summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-postgresql.py
diff options
context:
space:
mode:
authorVikram Mulukutla <markivx@codeaurora.org>2017-07-06 10:05:52 -0700
committerGeorg Veichtlbauer <georg@vware.at>2023-07-26 21:01:08 +0200
commit9e9dec3e818e5d10b81a5ccc167af54612cac21d (patch)
tree7dd50b7f021805821ecc1c8ab95982685c8942f9 /tools/perf/scripts/python/call-graph-from-postgresql.py
parent821cf3a1a8476001f02a27771dcd27ef8b913feb (diff)
cpufreq: schedutil: Fix sugov_start versus sugov_update_shared race
With a shared policy in place, when one of the CPUs in the policy is hotplugged out and then brought back online, sugov_stop and sugov_start are called in order. sugov_stop removes utilization hooks for each CPU in the policy and does nothing else in the for_each_cpu loop. sugov_start on the other hand iterates through the CPUs in the policy and re-initializes the per-cpu structure _and_ adds the utilization hook. This implies that the scheduler is allowed to invoke a CPU's utilization update hook when the rest of the per-cpu structures have yet to be re-inited. Apart from some strange values in tracepoints this doesn't cause a problem, but if we do end up accessing a pointer from the per-cpu sugov_cpu structure somewhere in the sugov_update_shared path, we will likely see crashes since the memset for another CPU in the policy is free to race with sugov_update_shared from the CPU that is ready to go. So let's fix this now to first init all per-cpu structures, and then add the per-cpu utilization update hooks all at once. Change-Id: I399e0e159b3db3ae3258843c9231f92312fe18ef Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions