mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
psi: Use deferrable psi_avgs_work
The logic for psi_avgs_work to not reschedule itself does not appear to work properly. 1) psi_avgs_work detects itself as a running task due to accounting for current states in get_recent_times(). 2) Drivers with self-rescheduling deferrable work with a period less than that of psi_avgs_work will always run when psi_avgs_work runs. This causes psi_avgs_work to retrigger. Make psi_avgs_work deferrable to avoid this loop. Change-Id: I90edc5d3cce87ada803f549f417cd0108ef2017f Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
This commit is contained in:
parent
76cf078de1
commit
b81d7fab27
1 changed files with 1 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ static void group_init(struct psi_group *group)
|
|||
for_each_possible_cpu(cpu)
|
||||
seqcount_init(&per_cpu_ptr(group->pcpu, cpu)->seq);
|
||||
group->avg_next_update = sched_clock() + psi_period;
|
||||
INIT_DELAYED_WORK(&group->avgs_work, psi_avgs_work);
|
||||
INIT_DEFERRABLE_WORK(&group->avgs_work, psi_avgs_work);
|
||||
mutex_init(&group->avgs_lock);
|
||||
/* Init trigger-related members */
|
||||
atomic_set(&group->poll_scheduled, 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue