From: Ingo Molnar Date: Thu, 19 Jun 2008 07:09:15 +0000 (+0200) Subject: Merge branch 'sched' into sched-devel X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=1cdad71537b42d0f0bf247772942ce678e4e8898;p=deliverable%2Flinux.git Merge branch 'sched' into sched-devel Conflicts: kernel/sched_rt.c Signed-off-by: Ingo Molnar --- 1cdad71537b42d0f0bf247772942ce678e4e8898 diff --cc kernel/sched_rt.c index f721b52acd8d,1dad5bbb59b6..fee5fa7c72db --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@@ -576,16 -454,17 +576,22 @@@ static void __enqueue_rt_entity(struct struct rt_rq *rt_rq = rt_rq_of_se(rt_se); struct rt_prio_array *array = &rt_rq->active; struct rt_rq *group_rq = group_rt_rq(rt_se); + struct list_head *queue = array->queue + rt_se_prio(rt_se); - if (group_rq && rt_rq_throttled(group_rq)) + /* + * Don't enqueue the group if its throttled, or when empty. + * The latter is a consequence of the former when a child group + * get throttled and the current group doesn't have any other + * active members. + */ + if (group_rq && (rt_rq_throttled(group_rq) || !group_rq->rt_nr_running)) return; - list_add_tail(&rt_se->run_list, array->queue + rt_se_prio(rt_se)); + if (rt_se->nr_cpus_allowed == 1) + list_add(&rt_se->run_list, queue); + else + list_add_tail(&rt_se->run_list, queue); + __set_bit(rt_se_prio(rt_se), array->bitmap); inc_rt_tasks(rt_se, rt_rq); @@@ -669,9 -549,10 +676,13 @@@ stati void requeue_rt_entity(struct rt_rq *rt_rq, struct sched_rt_entity *rt_se) { struct rt_prio_array *array = &rt_rq->active; + struct list_head *queue = array->queue + rt_se_prio(rt_se); - list_del_init(&rt_se->run_list); - list_add_tail(&rt_se->run_list, array->queue + rt_se_prio(rt_se)); - if (on_rt_rq(rt_se)) - list_move_tail(&rt_se->run_list, queue); ++ if (on_rt_rq(rt_se)) { ++ list_del_init(&rt_se->run_list); ++ list_add_tail(&rt_se->run_list, ++ array->queue + rt_se_prio(rt_se)); ++ } } static void requeue_task_rt(struct rq *rq, struct task_struct *p)