On Tue, May 3, 2011 at 2:32 AM, Abu Rasheda <rcpilot2010@xxxxxxxxx> wrote:
I am testing my driver on much faster host processor and facing
following issues:
My host is too powerful and it can fill up device buffer queue very fast.
I get best performance when I do busy wait, but this is not desirable
and is bad design.
I need to sleep and wake up quickly and predictability. Indication
from device that queue has space, is coming in form of memory write
(device writes to a memory location of i86 processor).
I tried using wait_event_interruptible_timeout, I am depending on 2nd
parameter of the function but it wake up is too slow, even tried using
value of 1.
Any suggestions ?
Many of us are just newbies in this area, and therefore, get it working is much more important than to optimize it - u can safely said that the hardcore kernel developer has already optimize many of these problems away, and so if they cannot do it, there must be a reason...try to probe more first perhaps.
High speed networking device has many special hardware features: IP/UDP/TCP checksum offload etc.
Eg, "Interrupt mitigation" - whereby interrupt mechanism is disabled (in particular my desktop PC's r8196.c is using this feature) and polling takes over instead - but u have to implemented complicated mechanism to reinject the interrupt if necessary (read r8196.c).
And if u really ready....this is a good writeup:
Other possible suggestion/features:
Jumbo frames:
PCI posting (pdf paper above and r8196.c).
Disabling TCP software checksum (and use the hardware instead):
And for loads of other ideas (eg, TCP bypass):
Generally a lot of these ideas can be found in the kernel source codes - just search and copy the implementation.....the highest network data transfer is achieved in infiniband-based Mellanox card (in some China supercomputer), and this involved the use of GPU technology etc....
--
Regards,
Peter Teoh
Regards,
Peter Teoh
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies