]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix posix scheduling violation for !SCHED_OTHER
authorAndrew Morton <akpm@osdl.org>
Mon, 29 Mar 2004 06:49:35 +0000 (22:49 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 29 Mar 2004 06:49:35 +0000 (22:49 -0800)
From: Joe Korty <joe.korty@ccur.com>

The following fixes a problem where a SCHED_FIFO task would on occasion be
moved to the end of its runqueue when returned to from a preemption.  Cause
was due to some SCHED_OTHER code in schedule() which was being run for tasks
of every policy.

kernel/sched.c

index 16dfb94841840b95148af819d9b2d860e7e4cc81..d5f21712ffbb57048ff73341d00ced8bb70af80f 100644 (file)
@@ -1678,7 +1678,7 @@ need_resched:
        queue = array->queue + idx;
        next = list_entry(queue->next, task_t, run_list);
 
-       if (next->activated > 0) {
+       if (!rt_task(next) && next->activated > 0) {
                unsigned long long delta = now - next->timestamp;
 
                if (next->activated == 1)