- From: walt <sartory_at_comcast.net>
- Date: Thu, 1 Sep 2005 10:59:47 -0400
SA, Can you say what HARDWARE you were using when you got 3M to 6M/sec? NI does have some "HS" cards intended for high speed data IO, but I have not tried these. Thanks, Walt On Thursday 01 September 2005 04:29, SA wrote: > Calin, > > I would also like to do this - I have another card supported by comedi > which is similarly restricted in its speed. The message from the list was > "this is how long it takes". > > Outside of comedi I wrote a driver for a different DIO card ages ago and I > was recently converting the driver to kernel 2.6. > > Originally my driver used read / write methods but during the update and > solely motivated by laziness I elected to use ioctl()s instead. At this > point the speed dropped by at least ten fold. I have subsequently > reimplemented the read / write methods and restored the speed. > > With this driver the ioctl() method achieves around 150k read/writes > /second with the read / write methods I got around 3M read/s and 6M > writes/s (memory caching influences the userland<->kernel space transfers > and favours writes). Even doing very small read / writes (single word) the > speed was increase ten fold. > > This really surprised me. > > Furthermore I can achieve hardware limited rates (9Mr/w) if I give up the > userland->kernel transfers and just have the driver hassle the card (ie if > I just want to generate a complex clock signal and program the kernel > driver to do this - obviously if the process is interupted you get a timing > delay / glitch but this doesn't matter to me). > > I do not know if this is directly related to the comedi performance but I > think this means that it is definitely possible to go much faster if you > use read/write instead of ioctl and faster still if you do the work in > kernel space. > > SA
Received on 2005-09-01Z13:59:47