[LAD] Litmus RT kernel
robin at gareus.org
Sat Mar 5 16:08:37 UTC 2011
On 03/05/2011 04:26 PM, michael noble wrote:
> On Sat, Mar 5, 2011 at 10:25 PM, Robin Gareus <robin at gareus.org> wrote:
>> quick glance: I got the impression that it only addresses scheduling
>> policy (task partitioning) and not realtime task preemption. Also
>> software needs to be written dedicated for Litmus RT.
> Judging from the installation instructions, it seems preemption is there:
yes but not AFAICT not real-time preemtion.
Vanialla linux does offer some process preemption models (adopted from
earlier RT linux patches), but what makes Thomas Gleixner's Preempt-RT
outstanding for audio is that it allows to preemt all process including
IRQ handlers. Lots of work has gone into that and this part is not
merged into Linus' tree [yet].
>> cd litmus-rt
>> patch -p1 < ../litmus-rt-2011.1.patch
>> # create a working kernel configuration
>> # - select HZ=1000
>> # - enable in-kernel preemptions
>> # - disable NO_HZ
>> # - don't use power management options like frequency scaling
>> # - disable support for group scheduling
>> # - disable "Write protect kernel read-only data structures" (in kernel debug)
>> I got the feeling from reading that the main thing missing is some kind of
> sane interface for assigning RT priviliges to non-root users. Then again,
> that maybe covered to some degree in the provided liblitmus which in turn
> rt_launch, which can be used to start arbitrary programs as real-time tasks.
yes, but you'll want IRQ handlers to be processes and tweak their RT
priority; and you will need to patch libjack to start audio-threads as
/RT task/, and not run the whole application process (GUI) with elevated
For non-jack apps: each application will need to set up its audio/midi
i/o thread in RT. running a whole GUI with RT privileges will make
things worse because GUI interaction will also be able to interrupt
> If I get adventurous I may try compiling this thing to see what I can see.
> Most of it is over my head and I'll take your word for it that this is far
> from userland friendly or ready, but it looks like a fun learning exercise.
You'll need to come up with a test-case where multiple processors are
involved in audio processing.. - don't let me discourage you but be
prepared that it will longer than a quick afternoon adventure.
I don't know if the same tools used for testing the preempt-rt-kernel
can be used for litmus, but you may want to look into
in particular https://rt.wiki.kernel.org/index.php/Cyclictest
More information about the Linux-audio-dev