Re: Soft real-time scheduling delays

Linux List Receive (llist@europa.dircon.co.uk)
Wed, 18 Jun 1997 10:23:12 +0100 (BST)


On Tue, 17 Jun 1997, Larry Troxler wrote:

> Greetings. I've been trying to make use of the Posix soft-real-time
> scheduling, and I've been having problems because it seems that
> sometimes a SCHED_FIFO process will not be immediately rescheduled when
> it becomes eligible to run, even if it is the only SCHED_FIFO process in
> the system.

I bumped into this when develping an audio player some time back. I
changed a line in add_to_runqueue() in kernel/sched.c from

if (p->counter > current->counter + 3)
need_resched = 1;

to

if ((p->counter > current->counter + 3)|(p->policy != SCHED_OTHER))
need_resched = 1;

the idea being that whenever a realtime process is made runnable we
should schedule() as soon as possible. This helped on my system, but I
should mention that I am new to kernel development so use this change
at your own risk.

cheers,

Chris.