Jan Kiszka wrote:
M. Koehrer schrieb:

Hi everybody,

I have a question concerning maximum performance. In a simulation
system that is realized using LXRT userspace and that runs
periodically (let's say every a milliseconds), it might be useful to
have the full network driver realized in user space as well. I think
that each change between user and kernel space is fairly expensive. Thus, when I do not want to use interrupts, it could be a really fast
solution to realize the network driver and all layers above (rtnet)
as pure user space (LXRT) programs. The questions: Is is possible, to
get a network driver running without interrupts? In this scenario,
the driver could be polled every simulation step which is faster than
switching completely to kernel mode.


What do you think about this - what about the performance gain?

Any comments on this are welcome!


Converting the devices drivers so that polling is used should be possible. Take a look at modern drivers supporting the NAPI. This interface is intended to reduce the CPU load caused by a very high number of interrupts, e.g. caused by GBit Ethernet.


But there are other issue you will face when moving RTnet to user space: low level synchronisation (spin and IRQ locks) or the usage of various kernel functions (PCI, DMA, etc.). I'm not sure at the moment if there are solutions available worth the effort. And if this will be faster than calling standard RTnet from user space - I don't think so.


Just for an information and irrespective of any efficiency problem there is a support (UserSpaceInterrupts USI) in RTAI that should help in facilitating the development of drivers in user space, without too much a difference from kernel I think, especially now with 3.1 fully ADEOSised.
It is likely it has been used just here at DIAPM and in the couple of examples found in showroom but the skeleton is there and can be improved if needed. I do not know about the PCI support functions but with the new memory management in 3.1 it should be possible to have DMA in user space also. I said "should" because I've personally tested allocating and using with GFP_DMA but never did real DMA aoperations from user space.


Paolo.



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
RTnet-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to