I'm trying to modify a kernel module that manages a special hardware. The user space process, performs 2 ioctl() system calls per milliseconds to talk with the module. This doesn't meet my real.time requirements because the 2 syscalls sometimes take to long to execute and go out my time slot. I know that with mmap I could share a memory area, and this is great, but how can I synchronize the data exchange with the module without ioctl() ?
Asked
Active
Viewed 703 times
1
-
Tell us more about the hardware and its requirements. The correct solution is going to be *very* specific to the details of your hardware timing requirements, software processing requirements, how much control you have over what else the platform is doing (general purpose? embedded? quasi-dedicated server only?), and so on. – David Schwartz Oct 12 '11 at 17:03
-
The hardware I use is a generic PC. it installs a card that runs a CANopen communication bus. CANopen-card module triggers the exchange of information with the process at the time of my user space ioctl(). The operating system is Linux with realtime patches. So I have high control on the execution time of the user space code. My problem is just when I run the ioctl(), in that moment it break the bonds of my realtime kernel. – user991839 Oct 12 '11 at 17:52
-
If you really need a user-space process to stop executing for just a millisecond or so and then resume, you shouldn't de-schedule it. Just spin in the kernel. You can't usefully schedule another process and then pre-empt it a millisecond or two later. It's a losing proposition. – David Schwartz Oct 12 '11 at 18:28