devfreq: Avoid competing with low-priority tasks

The work for load monitoring and reevaluation
can compete with low-priority tasks under high
sched pressure.

This patch makes the WQ a high priority WQ
to ensure that the work isn't delayed
under high sched pressure.

Signed-off-by: Alex Naidis <alex.naidis@linux.com>
This commit is contained in:
Alex Naidis 2017-02-12 17:04:45 +01:00 committed by spakkkk
parent f72f2a5aec
commit 3b0ba1d7aa

View File

@ -1400,7 +1400,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__);