Skip to contentSkip to conversation

don't awaken RT tasks on expired array

PATCH In review Mike Galbraith 2 participants 2 messages Mar 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't awaken RT tasks on expired array

RT tasks are being awakened on the expired array when expired_starving() is true, whereas they really should be excluded. Fix below.

kernel/sched.c renamed from kernel/sched.c.org +1 -1
@@ -820,7 +820,7 @@
 {
 	prio_array_t *target = rq->active;
 
-	if (unlikely(batch_task(p) || expired_starving(rq)))
+	if (unlikely(batch_task(p) || (expired_starving(rq) && !rt_task(p))))
 		target = rq->expired;
 	enqueue_task(p, target);
 	inc_nr_running(p, rq);
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Mike Galbraith

RT tasks are being awakened on the expired array when expired_starving() is true, whereas they really should be excluded. Fix below.

indeed, good catch.

kernel/sched.c line 821

Quoted 5 lines
kernel/sched.c renamed from kernel/sched.c.org +0 -0
@@ -820,7 +820,7 @@
 {
 	prio_array_t *target = rq->active;

[nit: please use -p when generating patches. If you are using quilt you can use QUILT_DIFF_OPTS="-p" in your .bashrc, and do 'quilt diff --no-timestamps --sort' to get pretty patch output.]

Ingo