* Serge Noiraud wrote: > Hi, > > I have a big dilemna on one machine : > I run a task with RT priority which make a loop to mesure the system > perturbation. > It works well except on one machine. > On a multi-cpu, If I run the program on cpu 1, I get 23us. It's OK. > If I run the same program on cpu 0, I get 17373us ! > If I do : > # echo 0 >/proc/sys/kernel/preempt_max_latency you can start/stop tracing from userspace too. Then you'll see what happens. See the attached trace-it.c code. After having activated user-triggered tracing, do something like this in your testcode: for (;;) { gettimeofday(0, 1); gettimeofday(0, 0); } this should measure the maximum userspace delay on that CPU. You can also read the TSC in the inner loop to validate the kernel tracer: for (;;) { gettimeofday(0, 1); t0 = rdtsc(); t1 = rdtsc(); gettimeofday(0, 0); if (t1-t0 > max) print_max(); } (you should not measure the trace start/stop functions themselves, they can take alot of time when a maximum-latency event happens.) Ingo