About fast I/O and IRP

Source: Internet
Author: User

This article is just a simple distinction between fast I/O and IRP, and a brief description of the differences.

Fast I/O in NT is another set of APIS for communication between IO manager and device driver. Io manager tries to use the fast I/O interface to accelerate various Io operations before calling an interface based on IRP.

First, fast I/O is a group of Interfaces independent of ordinary IRP processing distribution functions. However, they play the same role, that is, the driver processes external requests. The processed requests are also basically the same.

Second, common distribution routines and fastio routines of the file system may be called at any time. The filtering driver should filter both interfaces at the same time. However, we generally only introduce the IRP filtering method. The fast I/O interface is very complex. However, it basically corresponds to IRP filtering.

The following is an original article of DDK, hoping to help those who want to learn more about the differences between them.

IRPs are different from fast I/O

IRPs are the default mechanisms for requesting I/O operations. IRPs can be used for synchronous or asynchronous I/O, and for cached or noncached I/O. IRPs are also used for paging I/O. the Memory Manager processes page faults by sending appropriate IRPs
To the file system.

Fast I/O is specifically designed for rapid synchronous I/O on cached files. in fast I/O operations, data is transferred directly between user buffers and the system cache, bypassing the file system and the storage driver stack. (storage drivers do not
Use fast I/O .) if all of the data to be read from a file is resident in the system cache when a fast I/O read or write request is received, the request is satisfied immediately. otherwise, a page fault can occur, causing one or more IRPs to be generated. when
This happens, the fast I/O routine either returns false, or puts the caller into a wait state until the page fault is processed. if the fast I/O routine returns false, the requested operation failed and the caller must create an IRP.

File systems are required to support IRPs, but they are not required to support fast I/O. when the I/O manager es a request for Synchronous file I/O (other than paging I/O), it first determines whether the target device object's driver contains
An appropriate fast I/O callback routine. if it does, the I/O manager invokes the fast I/O routine. if no such fast I/O routine is found, the I/O manager creates and sends an IRP instead.

File System filter drivers are not required to support I/O on Control Device objects. however, filter device objects that are attached to file systems or volumes are required to pass all unrecognized or unwanted IRPs to the next-lower driver on the driver
Stack. In addition, filter device objects that are attached to volumes must implement
Fastiodetachdevice.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.