Before I get to my question, I'll go over what I am currently working with so you have a decent idea of what I've already done/tried.
I have a multithreaded usermode Windows Desktop Application that issues DeviceIOControl calls to a KMDF driver (purely software, no hardware). There are 5 seperate threads that all make the same custom IOCTL call to the driver constantly. This request consists of:
- PsLookupProcessByProcessId to get the process to read memory from.
- MmCopyVirtualMemory to copy the requested memory into the supplied buffer.
- ObDereferenceObject to decrement the reference count.
The driver is currently doing this serially, and the main bottleneck in my usermode application is waiting for the memory reads to complete and everything needs to be complete before the scene can be "rendered".
I've reduced the amount of DeviceIOControl requests as much as I can, so now I've been looking into overlapped IO and allowing each thread to send requests asynchronously. My question is if this is even something worth trying, as I do not know if I can use multiple threads in my driver to read from different addresses at the same time.