The performance of the driver you develop and the data transfer rate is
dependent on the specific OS, the hardware and the driver design.
Following are some suggestions for improving your driver's performance with WinDriver:
NOTE
The following explanations refer to the low-level WD_xxx WinDriver API. For updated guidelines on how to improve your driver's performance using the high-level WDC_xxx WinDriver PCI API, refer to the Improving Performance chapter in the WinDriver PCI User's Manual.
You can access memory addresses directly from your user mode
application, instead of calling WD_Transfer() to access the memory in the kernel.
When accessing I/O addresses you might improve the driver's performance by
using string transfers and/or replacing multiple calls to
WD_Transfer() with a single call to
WD_MultiTransfer().
To further improve the driver's performance, you can use WinDriver's
Kernel PlugIn feature in order to
move performance critical sections of your code from the user mode to the
kernel, thereby improving the overall performance of your driver. This feature
will allow you, for example, to handle interrupts directly in the kernel
(see also: Technical Document #48 with
regard to the Kernel PlugIn interrupt latency). A detailed description of the
Kernel PlugIn feature can be found in the WinDriver User's Manual.
To increase the data transfer rate you can try replacing several data
transfers, which use relatively small data buffers, with a single transfer
that uses a big data buffer, thereby eliminating some of the function
call overhead and reducing the context switches between the user and kernel
mode. You might also be able to improve the transfer rate by modifying the device's firmware (for example, by increasing the maximum packet size for the hardware). |

