path: root/kernel/sched/fair.c
diff options
authorXunlei Pang <>2016-05-09 12:11:31 +0800
committerIngo Molnar <>2016-05-10 10:02:46 +0200
commit13b5ab02ae118fc8dfdc2b8597688ec4a11d5b53 (patch)
treea13090d099c6721c710ed2e5f3a5ba8719c21a2e /kernel/sched/fair.c
parent536bd00cdbb7b908573e5a93bae67b64cbae60d8 (diff)
sched/rt, sched/dl: Don't push if task's scheduling class was changed
We got this warning: WARNING: CPU: 1 PID: 2468 at kernel/sched/core.c:1161 set_task_cpu+0x1af/0x1c0 [...] Call Trace: dump_stack+0x63/0x87 __warn+0xd1/0xf0 warn_slowpath_null+0x1d/0x20 set_task_cpu+0x1af/0x1c0 push_dl_task.part.34+0xea/0x180 push_dl_tasks+0x17/0x30 __balance_callback+0x45/0x5c __sched_setscheduler+0x906/0xb90 SyS_sched_setattr+0x150/0x190 do_syscall_64+0x62/0x110 entry_SYSCALL64_slow_path+0x25/0x25 This corresponds to: WARN_ON_ONCE(p->state == TASK_RUNNING && p->sched_class == &fair_sched_class && (p->on_rq && !task_on_rq_migrating(p))) It happens because in find_lock_later_rq(), the task whose scheduling class was changed to fair class is still pushed away as if it were a deadline task ... So, check in find_lock_later_rq() after double_lock_balance(), if the scheduling class of the deadline task was changed, break and retry. Apply the same logic to RT tasks. Signed-off-by: Xunlei Pang <> Reviewed-by: Steven Rostedt <> Acked-by: Peter Zijlstra <> Cc: Peter Zijlstra <> Cc: Steven Rostedt <> Cc: Juri Lelli <> Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'kernel/sched/fair.c')
0 files changed, 0 insertions, 0 deletions