I have an IOCTl on my device to do DMA and it works great until I hit some sort of threshold. I haven’t determined the exact value but know that when I attempt a transfer of size count = 0x1000000 my driver never enters the EvtIoDeviceControl(…) function.
DeviceIoControl( hDevice,
IOCTL_WRITE_DMA,
&input[0],
(3*sizeof(ULONG)),
buf, // Pointer to the large buffer
(count*sizeof(ULONG)), // This is 0x1000000*4
&bytesReturned,
&ol );
Since this is a blocking call my application sits here waiting but the driver trace messages never show up indicating it even entered EvtIoDeviceControl(…). Smaller transfers act as expected an print in traceview as well as complete successfully. I’m not sure if I should focus n the application or driver. It seems to be stuck in limbo.
Is your queue that processes IOCTLs a sequential or parallel queue? When you get to this point where it is lost, what does !wdfkd.wdfdevicequeues say about the pending and active requests in your queue(s)?
I have an IOCTl on my device to do DMA and it works great until I hit some sort of threshold. I haven’t determined the exact value but know that when I attempt a transfer of size count = 0x1000000 my driver never enters the EvtIoDeviceControl(…) function.
DeviceIoControl( hDevice,
IOCTL_WRITE_DMA,
&input[0],
(3*sizeof(ULONG)),
buf, // Pointer to the large buffer
(count*sizeof(ULONG)), // This is 0x1000000*4
&bytesReturned,
&ol );
Since this is a blocking call my application sits here waiting but the driver trace messages never show up indicating it even entered EvtIoDeviceControl(…). Smaller transfers act as expected an print in traceview as well as complete successfully. I’m not sure if I should focus n the application or driver. It seems to be stuck in limbo.
This is 64MB. You may be hitting some quote for amount of locked pages per process. Does DeviceIoControl hang in there or returns LastError of ERROR_IO_PENDING or any other error?
It was a matter of handling the return value incorrectly. It wasn’t ERROR_IO_PENDING as expected. After including the error check before getoverlappedresult it turn out the system is lacking the resources needed to handle the transaction.
ERROR_NO_SYSTEM_RESOURCES
1450 (0x5AA)
Insufficient system resources exist to complete the requested service.
I have an IOCTl on my device to do DMA and it works great until I hit some sort of threshold. I haven’t determined the exact value but know that when I attempt a transfer of size count = 0x1000000 my driver never enters the EvtIoDeviceControl(…) function.
DeviceIoControl( hDevice,
IOCTL_WRITE_DMA,
&input[0],
(3*sizeof(ULONG)),
buf, // Pointer to the large buffer
(count*sizeof(ULONG)), // This is 0x1000000*4
&bytesReturned,
&ol );
Since this is a blocking call my application sits here waiting but the driver trace messages never show up indicating it even entered EvtIoDeviceControl(…). Smaller transfers act as expected an print in traceview as well as complete successfully. I’m not sure if I should focus n the application or driver. It seems to be stuck in limbo.
I have an IOCTl on my device to do DMA and it works great until I hit some sort of threshold. I haven’t determined the exact value but know that when I attempt a transfer of size count = 0x1000000 my driver never enters the EvtIoDeviceControl(…) function.
DeviceIoControl( hDevice,
IOCTL_WRITE_DMA,
&input[0],
(3*sizeof(ULONG)),
buf, // Pointer to the large buffer
(count*sizeof(ULONG)), // This is 0x1000000*4
&bytesReturned,
&ol );
Which operating system is this? I assume this is a METHOD_OUT_DIRECT
ioctl, which means the system has to create an MDL for your buffer.
There used to be a limit of 64MB on a single MDL, and that’s what you
have here.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.