PM / devfreq: Make the monitor workqueue high priority
Running the devfreq monitor in a normal-priority workqueue can result in the devfreq mutex lock being held for a while when the monitor worker sleeps inside update_devfreq(). Freeing up the devfreq mutex lock is important to ensure timely devfreq boosts, so run the monitor workqueue in a high-priority workqueue to reduce the lock duration. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: celtare21 <celtare21@gmail.com>
This commit is contained in:
parent
bd260c10fc
commit
cb79672815
1 changed files with 2 additions and 1 deletions
|
@ -1906,7 +1906,8 @@ static int __init devfreq_init(void)
|
|||
return PTR_ERR(devfreq_class);
|
||||
}
|
||||
|
||||
devfreq_wq = create_freezable_workqueue("devfreq_wq");
|
||||
devfreq_wq = alloc_workqueue("devfreq_wq", WQ_HIGHPRI | WQ_FREEZABLE |
|
||||
WQ_UNBOUND | WQ_MEM_RECLAIM, 1);
|
||||
if (!devfreq_wq) {
|
||||
class_destroy(devfreq_class);
|
||||
pr_err("%s: couldn't create workqueue\n", __FILE__);
|
||||
|
|
Loading…
Reference in a new issue