On 02/14/2011 03:42 PM, Peter LaDow wrote:
Pseudo-code. I can post the full code if it helps.
My first thought was whether the compiler optimizes away the for loop.
Either way you would be hammering on the clock_gettime in a narly way,
it might be better just to hand-code a register read, if this is just
some kind of benchmark.
It would be good to know the time source chipset and its resolution.
what is the distribution for t2 - t1 btw?
for starters ;)
On Feb 14, 2011, at 3:35 PM, Sven-Thorsten Dietrich
<thebigcorporation@xxxxxxxxx> wrote:
On Mon, 2011-02-14 at 15:08 -0800, Peter LaDow wrote:
Note sure how that is possible. This is related to my earlier posting
about timing jitter. Our code is basically this:
Where is the semicolon ending the for loop?
while(1)
{
t1 = clock_gettime()
for(i=0; i< 10000; i++)
t2 = clock_gettime()
diff = t2 - 1
}
This task is pending on nothing. Unless clock_gettime() causes some
sort of priority inversion, I don't see the problem. We see
significant jitter on the for-loop when there are a significant number
of other kernel timers. Now, as we understand it, the hrtimers run in
the softirq. But if the softirq is priority 50, and this for-loop is
priority 99, it shouldn't be affected by the softirq thread.
Pete
On Mon, Feb 14, 2011 at 3:04 PM, Sven-Thorsten Dietrich
<thebigcorporation@xxxxxxxxx> wrote:
On Mon, 2011-02-14 at 14:31 -0800, Peter LaDow wrote:
How is the scheduling of the hrtimers softirq thread handled?
When querying the RT priority of the hrtimer softirq, I get a priority
of 50. But when running a priority 99 thread, we still seem to be
getting interrupted. Shouldn't the hrtimer softirq be put off until
the CPU is idle or a lower priority task is running?
Does your prio 99 thread perhaps encounter a prio inversion dependency
on one of the softriq threads?
Thanks,
Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html