Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e610c7f9 authored by Sultan Alsawaf's avatar Sultan Alsawaf Committed by Pranav Vashi
Browse files

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: default avatarSultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent 2298a8c1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1303,7 +1303,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__);