struct list_head *queue;
int idx;
- if (sched_rt_ratio_exceeded(rt_rq))
- goto out;
-
idx = sched_find_first_bit(array->bitmap);
BUG_ON(idx >= MAX_RT_PRIO);
queue = array->queue + idx;
next = list_entry(queue->next, struct sched_rt_entity, run_list);
- out:
+
return next;
}
struct task_struct *p;
struct rt_rq *rt_rq;
- retry:
rt_rq = &rq->rt;
if (unlikely(!rt_rq->rt_nr_running))
do {
rt_se = pick_next_rt_entity(rq, rt_rq);
- if (unlikely(!rt_se))
- goto retry;
+ BUG_ON(!rt_se);
rt_rq = group_rt_rq(rt_se);
} while (rt_rq);
p->rt.timeout++;
next = DIV_ROUND_UP(min(soft, hard), USEC_PER_SEC/HZ);
- if (next > p->rt.timeout) {
- u64 next_time = p->se.sum_exec_runtime;
-
- next_time += next * (NSEC_PER_SEC/HZ);
- if (p->it_sched_expires > next_time)
- p->it_sched_expires = next_time;
- } else
+ if (p->rt.timeout > next)
p->it_sched_expires = p->se.sum_exec_runtime;
}
}