aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h2
-rw-r--r--kernel/fork.c1
-rw-r--r--kernel/sched/core.c6
3 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 306f4f0c987a..c9c9ff723525 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1440,8 +1440,6 @@ struct task_struct {
1440 struct rb_node *pi_waiters_leftmost; 1440 struct rb_node *pi_waiters_leftmost;
1441 /* Deadlock detection and priority inheritance handling */ 1441 /* Deadlock detection and priority inheritance handling */
1442 struct rt_mutex_waiter *pi_blocked_on; 1442 struct rt_mutex_waiter *pi_blocked_on;
1443 /* Top pi_waiters task */
1444 struct task_struct *pi_top_task;
1445#endif 1443#endif
1446 1444
1447#ifdef CONFIG_DEBUG_MUTEXES 1445#ifdef CONFIG_DEBUG_MUTEXES
diff --git a/kernel/fork.c b/kernel/fork.c
index d2799d1fc952..6ff87f4429a4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1095,7 +1095,6 @@ static void rt_mutex_init_task(struct task_struct *p)
1095 p->pi_waiters = RB_ROOT; 1095 p->pi_waiters = RB_ROOT;
1096 p->pi_waiters_leftmost = NULL; 1096 p->pi_waiters_leftmost = NULL;
1097 p->pi_blocked_on = NULL; 1097 p->pi_blocked_on = NULL;
1098 p->pi_top_task = NULL;
1099#endif 1098#endif
1100} 1099}
1101 1100
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2dbc63d1a847..cf7695a6c1d2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2980,7 +2980,6 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
2980 } 2980 }
2981 2981
2982 trace_sched_pi_setprio(p, prio); 2982 trace_sched_pi_setprio(p, prio);
2983 p->pi_top_task = rt_mutex_get_top_task(p);
2984 oldprio = p->prio; 2983 oldprio = p->prio;
2985 prev_class = p->sched_class; 2984 prev_class = p->sched_class;
2986 on_rq = p->on_rq; 2985 on_rq = p->on_rq;
@@ -3000,8 +2999,9 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
3000 * running task 2999 * running task
3001 */ 3000 */
3002 if (dl_prio(prio)) { 3001 if (dl_prio(prio)) {
3003 if (!dl_prio(p->normal_prio) || (p->pi_top_task && 3002 struct task_struct *pi_task = rt_mutex_get_top_task(p);
3004 dl_entity_preempt(&p->pi_top_task->dl, &p->dl))) { 3003 if (!dl_prio(p->normal_prio) ||
3004 (pi_task && dl_entity_preempt(&pi_task->dl, &p->dl))) {
3005 p->dl.dl_boosted = 1; 3005 p->dl.dl_boosted = 1;
3006 p->dl.dl_throttled = 0; 3006 p->dl.dl_throttled = 0;
3007 enqueue_flag = ENQUEUE_REPLENISH; 3007 enqueue_flag = ENQUEUE_REPLENISH;