Thread (3 messages) 3 messages, 2 authors, 2017-02-16

Re: Latency difference between posix & non-posix timer

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2017-02-15 17:12:27

On 2017-02-05 19:11:01 [+0200], Ran Shalit wrote:
Hello,
Hi,
We made some testing on out cpu, installed with 4.1.15-rt17 kernel,
and we observed significant difference in latency between posic to
non-posix cyclictest benchmark.

with non posix we reach max ~50usec
while with posix we reach max ~170usec

On checking the exaples in cyclic test wiki, it seems that the
difference should not be that big :
https://rt.wiki.kernel.org/index.php/Cyclictest

What is the reason for such difference in behaviour ?
Does it mean we better use non-posix timer in application ?
As written in the other thread (regarding posix-timer):
I tested today v4.9-RT and didn't notice such high spikes between
clock_nanosleep and the posix timer. You have the consider that the
wakeup happens from ktimersoftirq so you have one additional context
switch here.
I general the clock_nansleep interface should be preferred if possible
to avoid that ctx switch.

Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help