Scheduling io-net

I have a tough question I’m hoping you can help me with. In an above (en_en)
filter I’m sending a packet every millisecond from one node (the master),
and it is received at another node (the slave) in the same above filter. I’m
measuring the time between received packets at the slave using
ClockCycles(). No other packets are transmitted by anyone on this Ethernet
wire except for this sync packet. When neither box is doing anything else I
just about meet my real-time requirements. The longest delay I’ve seen
between packets is the nominal 1ms plus 25us; I need to get this under 20us,
which I think is doable considering this is a first cut. My problem comes
when the slave node is doing anything else. I telnet into the slave (on a
separate nic from the one reserved for real-time traffic), edit some source
code in vi, and compile (make, gcc), just to simulate some busy-work (in the
real-world it will be doing other tasks). In this situation I get delays of
70us often, and as much as 140us. I’m pretty sure I can attribute this to
scheduling issues, as I’ve done nothing so far to make sure the scheduling
of io-net meets my real-time requirements. Is it possible to boost the
priority of the threads that deal with the real-time nic and my above
filter? Failing that, can I raise the priority of io-net in its entirety
above everything else using nice? I tried renice on io-net but it only
affected certain threads, and I’m not sure how it affects the thread pool.

Specs:
750 MHz PIII
QNX 6.1.0 patchA
100 Mb/s Ethernet (speedo driver)

Thanks,
Shaun

Drivers usually handle interrupt events at priority 21 however
the amount of work done on each interrupt can vary. Your
rx_up() function is probably being called by such a driver
thread.

-seanb

Shaun Jackman <sjackman@nospam.vortek.com> wrote:

I have a tough question I’m hoping you can help me with. In an above (en_en)
filter I’m sending a packet every millisecond from one node (the master),
and it is received at another node (the slave) in the same above filter. I’m
measuring the time between received packets at the slave using
ClockCycles(). No other packets are transmitted by anyone on this Ethernet
wire except for this sync packet. When neither box is doing anything else I
just about meet my real-time requirements. The longest delay I’ve seen
between packets is the nominal 1ms plus 25us; I need to get this under 20us,
which I think is doable considering this is a first cut. My problem comes
when the slave node is doing anything else. I telnet into the slave (on a
separate nic from the one reserved for real-time traffic), edit some source
code in vi, and compile (make, gcc), just to simulate some busy-work (in the
real-world it will be doing other tasks). In this situation I get delays of
70us often, and as much as 140us. I’m pretty sure I can attribute this to
scheduling issues, as I’ve done nothing so far to make sure the scheduling
of io-net meets my real-time requirements. Is it possible to boost the
priority of the threads that deal with the real-time nic and my above
filter? Failing that, can I raise the priority of io-net in its entirety
above everything else using nice? I tried renice on io-net but it only
affected certain threads, and I’m not sure how it affects the thread pool.

Specs:
750 MHz PIII
QNX 6.1.0 patchA
100 Mb/s Ethernet (speedo driver)

Thanks,
Shaun