Re: Why is real time pinging not possible with RT kernels?

Corey Minyard
2017-06-17T12:10:36Z

On 06/17/2017 03:37 AM, rolf.freitag@email.de wrote:
> Hi,
>
> Gesendet: Montag, 12. Juni 2017 um 18:45 Uhr
> Von: "Chris Friesen" <chris.friesen@windriver.com>
> ...
>>> A few notes on what you have done:
>>>
>>> * ionice doesn't affect network I/O.
>>> * renice does not set real-time priorities.
>> Good point...the OP probably wants something like "sudo chrt <prio> <cmd> ...."
> Ok, i added chrt in the script:
>
> ionice -c3 -p $$
> renice +19 -p $$
> chrt -f -p 99 $$
> ping -q -s 28 -l 1 -p 0f1e2d3c4b5a6978 -i 0.001 localhost
>
> and now the worst case latency is about twice the value measured with cyclictest:
>
> 27893223 packets transmitted, 27893223 received, 0% packet loss, time 27921273ms
> rtt min/avg/max/mdev = 0.022/0.023/0.280/0.006 ms

That is pretty good, really. However, I'm guessing you aren't doing
anything
else on the system.

When we test RT, we do so while running a heavy I/O, network, and CPU load.
If you do that, you may see very different results, though I doubt
cyclictest
will move much.

That's what RT is about. If someone decides to log on to your system
running
an RT application, and compiles a kernel or something, your RT application
still meets its deadlines.

>
>>> * You don't do anything with memory locking. What happens
>>> if memory in your program gets paged out then is required?
> I use much RAM and no swap, so i have implicit memory locking.

That is not implicit memory locking. The kernel is free to swap out
anything
that is backed by disk, like your executable code. Lots of memory helps,
but does not offer a guarantee. Lack of swap doesn't matter (much).

-corey

> Regards,
>
> Rolf
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html