If you're able to reliably exceed 500us on a system that's not heavily loaded, I think you're looking at a bad driver implementation (or its userspace wrapper/counterpart).
Up vote 0 down vote favorite share g+ share fb share tw.
I have a Fibre Optic link, with a proprietary Device Driver. The link goes into a PCIe card. Running on a RHEL 5.2 (2.6.18-128~) I have mmap'ed the interface on the card for setup and FIFO access etc, and these read/writes take a few µs to complete, so all good there.
But of course cannot use this for interrupts, so I have to use the kernel module provided, with its user-space lib interface. WaitForInterrupt(); // API lib interface to kernel module // Interrupt occurs and am returned to my code in user space time = CurrentTime() - LatchedTime(); // time to get to here It takes around 70µs to return from WaitForInterrupt(). (The time the interrupt is raised is latched in the firmware, I read this which as I say above takes ~2µs, and compare it against the current time in the firmware) What are expected access times between an interrupt occurring and the User Space API interrupt call wait method returning?
Network/other-high-speed interfaces take? Linux linux-kernel real-time linux-device-driver interrupt link|improve this question edited Mar 2 '11 at 9:37 asked Sep 18 '10 at 19:34Ian Vaughan1,0741818 82% accept rate.
Linux is not a real-time operating system. – Carl Norum Sep 18 '10 at 19:42 1 I don't think I need real-time, just fast-time! – Ian Vaughan Sep 19 '10 at 9:19.
If you're able to reliably exceed 500us on a system that's not heavily loaded, I think you're looking at a bad driver implementation (or its userspace wrapper/counterpart). In my experience the latency to wake a user thread on interrupt should be less than 10us, though (as others have said) Linux provides no latency guarantees.
500ms is many orders of magnitudes larger than what a simple switch between userspace/kernel takes, but as someone mentioned in comments, linux is not a real time OS, so there's no guarantee 500ms "hickups" won't show up now and then. It's quite impossible to tell what the culprit is, the device driver could simpliy be trying to bundle up data to be more efficient. That said, we've had endless troubles with some custom cards and interactions with both APIC and ACPI, requireing a delicate balance of bios settings, what card goes into which PCI slot and whether a particular video card screws up everything - likely a cause of a dubious driver interacting with more or less buggy bios/video-cards..
If you have a recent kernel, you can use the perf sched tool to measure the latency, and see where the time is being used. (500us does sound a tad on the high side, depending on your processor, how many tasks are running, ...).
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.