Commit 466af29b authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Ingo Molnar

sched/deadline: Kill task_struct->pi_top_task

Remove task_struct->pi_top_task. The only user, rt_mutex_setprio(),
can use a local.
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@gmail.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Daeseok Youn <daeseok.youn@gmail.com>
Cc: Dario Faggioli <raistlin@linux.it>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matthew Dempsky <mdempsky@chromium.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Link: http://lkml.kernel.org/r/20140606165206.GB29465@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent b728ca06
...@@ -1440,8 +1440,6 @@ struct task_struct { ...@@ -1440,8 +1440,6 @@ struct task_struct {
struct rb_node *pi_waiters_leftmost; struct rb_node *pi_waiters_leftmost;
/* Deadlock detection and priority inheritance handling */ /* Deadlock detection and priority inheritance handling */
struct rt_mutex_waiter *pi_blocked_on; struct rt_mutex_waiter *pi_blocked_on;
/* Top pi_waiters task */
struct task_struct *pi_top_task;
#endif #endif
#ifdef CONFIG_DEBUG_MUTEXES #ifdef CONFIG_DEBUG_MUTEXES
......
...@@ -1095,7 +1095,6 @@ static void rt_mutex_init_task(struct task_struct *p) ...@@ -1095,7 +1095,6 @@ static void rt_mutex_init_task(struct task_struct *p)
p->pi_waiters = RB_ROOT; p->pi_waiters = RB_ROOT;
p->pi_waiters_leftmost = NULL; p->pi_waiters_leftmost = NULL;
p->pi_blocked_on = NULL; p->pi_blocked_on = NULL;
p->pi_top_task = NULL;
#endif #endif
} }
......
...@@ -2980,7 +2980,6 @@ void rt_mutex_setprio(struct task_struct *p, int prio) ...@@ -2980,7 +2980,6 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
} }
trace_sched_pi_setprio(p, prio); trace_sched_pi_setprio(p, prio);
p->pi_top_task = rt_mutex_get_top_task(p);
oldprio = p->prio; oldprio = p->prio;
prev_class = p->sched_class; prev_class = p->sched_class;
on_rq = p->on_rq; on_rq = p->on_rq;
...@@ -3000,8 +2999,9 @@ void rt_mutex_setprio(struct task_struct *p, int prio) ...@@ -3000,8 +2999,9 @@ void rt_mutex_setprio(struct task_struct *p, int prio)
* running task * running task
*/ */
if (dl_prio(prio)) { if (dl_prio(prio)) {
if (!dl_prio(p->normal_prio) || (p->pi_top_task && struct task_struct *pi_task = rt_mutex_get_top_task(p);
dl_entity_preempt(&p->pi_top_task->dl, &p->dl))) { if (!dl_prio(p->normal_prio) ||
(pi_task && dl_entity_preempt(&pi_task->dl, &p->dl))) {
p->dl.dl_boosted = 1; p->dl.dl_boosted = 1;
p->dl.dl_throttled = 0; p->dl.dl_throttled = 0;
enqueue_flag = ENQUEUE_REPLENISH; enqueue_flag = ENQUEUE_REPLENISH;
......
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