Commit a8ec5880 authored by Ammar Faizi's avatar Ammar Faizi Committed by Tejun Heo

workqueue: Simplify a pr_warn() call in wq_select_unbound_cpu()

Use pr_warn_once() to achieve the same thing. It's simpler.
Signed-off-by: default avatarAmmar Faizi <ammarfaizi2@gnuweeb.org>
Reviewed-by: default avatarLai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 2c106e15
......@@ -1392,15 +1392,13 @@ static bool is_chained_work(struct workqueue_struct *wq)
*/
static int wq_select_unbound_cpu(int cpu)
{
static bool printed_dbg_warning;
int new_cpu;
if (likely(!wq_debug_force_rr_cpu)) {
if (cpumask_test_cpu(cpu, wq_unbound_cpumask))
return cpu;
} else if (!printed_dbg_warning) {
pr_warn("workqueue: round-robin CPU selection forced, expect performance impact\n");
printed_dbg_warning = true;
} else {
pr_warn_once("workqueue: round-robin CPU selection forced, expect performance impact\n");
}
if (cpumask_empty(wq_unbound_cpumask))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment