Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.31-19

From: Ingo Molnar
Date: Thu Dec 02 2004 - 08:13:29 EST



* Florian Schmidt <mista.tapas@xxxxxxx> wrote:

> Hmm, i wonder if there's a way to detect non RT behaviour in jackd
> clients. I mean AFAIK the only thing allowed for the process callback
> of on is the FIFO it waits on to be woken, right? Every other sleeping
> is to be considered a bug.

there's such a feature in -RT kernels. If a user process calls:

gettimeofday(1,1);

then the kernel turns 'atomic mode' on. To turn it off, call:

gettimeofday(1,0);

while in atomic-mode, any non-atomic activity (scheduling) will produce
a kernel message and a SIGUSR2 sent to the offending process (once,
atomic mode has to be re-enabled again for the next message). Preemption
by a higher-prio task does not trigger a message/signal.

If you run the client under gdb you should be able to catch the SIGUSR2
signal and then you can see the offending code's backtrace via 'bt'.

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