From 6db6bf55bece8d75697e966cdea3654005394802 Mon Sep 17 00:00:00 2001 From: Alex Naidis Date: Sun, 12 Feb 2017 17:04:45 +0100 Subject: [PATCH] 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 Signed-off-by: UtsavBalar1231 --- drivers/devfreq/devfreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index e66ea8953792..597d3d6eeb60 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -1302,7 +1302,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__);