diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6f16dfb742462..c6cb8832796b5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6429,6 +6429,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) * pattern is IO completions. */ if (is_per_cpu_kthread(current) && + in_task() && prev == smp_processor_id() && this_rq()->nr_running <= 1) { return prev;