Device driver scheduling time

Claude Gamache (cgamache@cae.ca)
02 Nov 1998 17:47:50 -0500


Hi,

I need to write a device driver that must send data to a device
every 8 milliseconds.

Unless something changes, the device will not send me any interrupt to
wake my driver. With a timer (add_timer) the driver can only be
executed every 10 ms (Linux-i386). With Linux-Alpha, add_timer would
allowed the driver to be executed every 1 ms.

For the moment, I re-schedule the driver with the scheduler
queue. This allows the driver to run approximatively 2 times per clock
tick, so every 5 ms. But this is rather coarse and yet not sufficient.

So I was considering using the Real Time Clock to get interrupts at a
rate of 128 Hz (8 ms is 125 Hz, but the difference is acceptable).

Is there any other way to achieve this ?
And are there any "dangers" for the system if I use the RTC ? (I'm
thinking about system time and others)

Thanks for your help,

Claude

-- 
  Claude Gamache, CAE Electronique Ltee, 8585 Cote-de-Liesse  
  Saint-Laurent,  Quebec, Canada H4T 1G6                        
  Email: cgamache@cae.ca  Tel.: (514) 341-2000 x3194, Fax: (514) 734-5612

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/