|
@@ -3442,8 +3442,13 @@ change:
|
|
|
|
|
|
if (running)
|
|
if (running)
|
|
p->sched_class->set_curr_task(rq);
|
|
p->sched_class->set_curr_task(rq);
|
|
- if (on_rq)
|
|
|
|
- enqueue_task(rq, p, 0);
|
|
|
|
|
|
+ if (on_rq) {
|
|
|
|
+ /*
|
|
|
|
+ * We enqueue to tail when the priority of a task is
|
|
|
|
+ * increased (user space view).
|
|
|
|
+ */
|
|
|
|
+ enqueue_task(rq, p, oldprio <= p->prio ? ENQUEUE_HEAD : 0);
|
|
|
|
+ }
|
|
|
|
|
|
check_class_changed(rq, p, prev_class, oldprio);
|
|
check_class_changed(rq, p, prev_class, oldprio);
|
|
task_rq_unlock(rq, p, &flags);
|
|
task_rq_unlock(rq, p, &flags);
|