From: Chad Goodman Date: Tue, 27 Nov 2012 03:07:57 +0000 (-0800) Subject: SCHEDULER: minor updates from CAF X-Git-Url: https://projects.ziggy471.com/git/gitweb.cgi?p=ziggy471-sgs3-jb.git;a=commitdiff;h=e413f59d3caaf08531a7a0748e4bf4840c01d93b SCHEDULER: minor updates from CAF Signed-off-by: Ziggy --- --- a/kernel/sched.c +++ b/kernel/sched.c @@ -128,7 +128,7 @@ static inline int rt_policy(int policy) { - if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR)) + if (policy == SCHED_FIFO || policy == SCHED_RR) return 1; return 0; } @@ -2501,7 +2501,7 @@ ttwu_do_wakeup(struct rq *rq, struct tas if (p->sched_class->task_woken) p->sched_class->task_woken(rq, p); - if (unlikely(rq->idle_stamp)) { + if (rq->idle_stamp) { u64 delta = rq->clock - rq->idle_stamp; u64 max = 2*sysctl_sched_migration_cost; --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -1126,7 +1126,7 @@ static struct task_struct *_pick_next_ta rt_rq = &rq->rt; - if (unlikely(!rt_rq->rt_nr_running)) + if (!rt_rq->rt_nr_running) return NULL; if (rt_rq_throttled(rt_rq)) @@ -1207,7 +1207,7 @@ static struct task_struct *pick_next_hig next_idx: if (idx >= MAX_RT_PRIO) continue; - if (next && next->prio < idx) + if (next && next->prio <= idx) continue; list_for_each_entry(rt_se, array->queue + idx, run_list) { struct task_struct *p; @@ -1553,7 +1553,7 @@ skip: static void pre_schedule_rt(struct rq *rq, struct task_struct *prev) { /* Try to pull RT tasks here if we lower this rq's prio */ - if (unlikely(rt_task(prev)) && rq->rt.highest_prio.curr > prev->prio) + if (rq->rt.highest_prio.curr > prev->prio) pull_rt_task(rq); }