none
Could anybody tell me what ReadFile actually does? Does it read internally using IDE_COMMAND_READ_DMA_EXT or IDE_COMMAND_READ_FPDMA_QUEUED? RRS feed

  • Question

  • I am trying to find the throughput of my SSD by writing a KMD driver by actually sending a IDE_COMMAND_READ_DMA_EXT command. I have downloaded IOMETER and Windows disk benchmark tool and plotted throughput for different data sizes. The throughput I am getting is not actually matching with the tools output. I have downloaded the source code of IOMETER and found that it is using "ReadFile" and "WriteFile" functions. Could anybody tell me what this "ReadFile" does? Whether it uses NCQ based DMA transfer or simple DMA read command?

    varun rao K M

    Monday, January 9, 2017 11:20 AM

Answers

  • ReadFile just becomes an IRP_MJ_READ which the system passes down the storage stack to storage port driver.   What matters is the storage port/miniport driver pair.   If you use the standard IDE driver you will not see NCQ.   If you write your own Storport miniport and have enabled the correct capabilities you can issue a NCQ call, and see an effective increase in performance.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Monday, January 9, 2017 12:26 PM

All replies

  • ReadFile just becomes an IRP_MJ_READ which the system passes down the storage stack to storage port driver.   What matters is the storage port/miniport driver pair.   If you use the standard IDE driver you will not see NCQ.   If you write your own Storport miniport and have enabled the correct capabilities you can issue a NCQ call, and see an effective increase in performance.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Monday, January 9, 2017 12:26 PM
  • ReadFile is a Windows API function to read from files of various nature and devices. Please see the documentation.

    -- pa

    Monday, January 9, 2017 12:29 PM