Hi, I'm using the RT patch for a project where I have to communicate over ethernet and 8 serial ports (via a pci multi-interface card). I must gain CPU time for a while in every millisecond which is my periodic cycle time. Most things seem ok, but for some strange reason, 2-3 ms latencies show up rarely about once out of 200000 cycle runs or so when the machine is under load, mostly of interrupts. It took a while for me to track it down but finally found that this latency is not related to a slower part of my cycle, but is caused indirectly by an ioctl() call in the cycle with TIOCMGET read command on the serial ports that translates to a driver-dependent get_mctrl call inside the kernel. If the call is in, the delay shows up elsewhere every time, spread across the cycle (found that with extensive timestamping) so I'm thinking of some interrupt kicking in a while after the ioctl() call. Commenting the call out eliminates the problem completely, but it unfortunately eliminates the functionality of my code as well since things depend on the line states so I cannot spare the read of the modem status register. I'm currently using 2.6.19-rt15 but this problem shows up with every kernel and patch version I've tried (starting from 2.6.16 to 2.6.20) and I'm not really able to test newer versions currently because the server is under heavy use. However, I suspect that this problem is not an easy sight to come by and probably still persists. Of course my task is running with the highest real-time priority. The lower level serial driver that is in use is drivers/serial/8250.c. I'm afraid I don't have a deep enough insight to track it down any further, so I thought I'd try if this description rings a bell with more knowledgeable persons. Any help would be greatly appreciated. s. ---------------------------------------------------------------------------- | Hard work often pays off after time, but laziness always pays off now. | ----------------------------------------------------------------------------
Attachment:
pgpy7lmSePVCw.pgp
Description: PGP signature