Skip to content

Commit

Permalink
msm: thermal: Optimize locking in thermal frequency
Browse files Browse the repository at this point in the history
 mitigation thread

Optimize locking in thermal frequency mitigation thread
to reduce lock contention with hotplug mitigation thread.
This lock is not explicitly required since the cpu driver
already have a per cluster lock down the freqency mitigation
call path. This would be much optimized since the new changes
will hold the lock for a shorter period and unlike previously
where the lock was for entire cluster, this is per cluster
lock that will further reduce lock contention. This would
help thermal to do mitigation faster.

Signed-off-by: Shiju Mathew <[email protected]>
Signed-off-by: Pranav Vashi <[email protected]>
  • Loading branch information
Shiju Mathew authored and neobuddy89 committed Jan 2, 2015
1 parent 245d14f commit 2f4d560
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/thermal/msm_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,6 @@ static __ref int do_freq_mitigation(void *data)
wait_for_completion(&freq_mitigation_complete);
INIT_COMPLETION(freq_mitigation_complete);

get_online_cpus();
for_each_possible_cpu(cpu) {
max_freq_req = (cpus[cpu].max_freq) ?
msm_thermal_info.freq_limit :
Expand Down Expand Up @@ -1220,7 +1219,6 @@ static __ref int do_freq_mitigation(void *data)
cpus[cpu].freq_thresh_clear = false;
}
}
put_online_cpus();
}
return ret;
}
Expand Down

0 comments on commit 2f4d560

Please sign in to comment.