Re: real-time threaded IO with low latency (audio)

yodaiken@chelm.cs.nmt.edu
Sun, 25 Jul 1999 16:53:01 -0600


On Mon, Jul 26, 1999 at 08:40:59AM +1000, Richard Gooch wrote:
> > Linux may die horribly if it allows the RT task to enter kernel mode.
> > So we would have to put guards on all kernel entry points
> > if running rt process (note current will not be useful)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Why not? We could add a flag bit to task_struct that means "RT
> process". So kernel entry points would just need to check
> current->is_rt

What you would have to do is something like

1. Linux process mlocks, and then calls rtl_register_task(function pointer)

event (e.g. timer irq)
rtl_irq handler
call rtl_scheduler
find rtl task to run
rtl task does switch to user mode at addr -- into linux process

The whole point is to avoid a Linux process switch -- and the attendent delays
So current points to the current linux process, but that may be waiting for
the realtime process.

> Why not move the process to a Linux run queue on kernel traps? This

It would be easy for the "parent" RT context to do this.

> > But it would require a bigger Linux patch.
>
> Indeed.
>
> > I described this idea to Linus and it made him deeply unhappy.
>
> Precisely what made him unhappy? The requirement to patch all kernel
> entry and exit points? Or just the concept of dropping RTL priority?

I suspect it was the extra glop on the kernel: but Californians are a mystery to
me. I'm not so thrilled with the idea either.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/