;
}
-static int pull_rt_task(struct rq *this_rq)
+static void pull_rt_task(struct rq *this_rq)
{
- int this_cpu = this_rq->cpu, ret = 0, cpu;
+ int this_cpu = this_rq->cpu, cpu;
+ bool resched = false;
struct task_struct *p;
struct rq *src_rq;
if (likely(!rt_overloaded(this_rq)))
- return 0;
+ return;
/*
* Match the barrier from rt_set_overloaded; this guarantees that if we
if (p->prio < src_rq->curr->prio)
goto skip;
- ret = 1;
+ resched = true;
deactivate_task(src_rq, p, 0);
set_task_cpu(p, this_cpu);
double_unlock_balance(this_rq, src_rq);
}
- return ret;
+ if (resched)
+ resched_task(this_rq->curr);
}
static void pre_schedule_rt(struct rq *rq, struct task_struct *prev)
if (!p->on_rq || rq->rt.rt_nr_running)
return;
- if (pull_rt_task(rq))
- resched_task(rq->curr);
+ pull_rt_task(rq);
}
void init_sched_rt_class(void)