Handling IRPs 10: Optimizations
来源:互联网 发布:金蝶软件连接数据库 编辑:程序博客网 时间:2024/06/06 02:18
Optimizations
By testing the value of the Irp->PendingReturned field, a driver can take advantage of the pending bit to optimize post-processing work for an I/O request. For example, a driver can use the processor cache efficiently, thus improving throughput, by post-processing the IRP after the IoCallDriver routine returns a synchronous response. The logic of such an optimization follows:
· In a synchronous I/O response, the thread that initiated the I/O request can perform post-processing ifIoCallDriver does not return STATUS_PENDING. In this case, the IRP is complete whenIoCallDriver returns, so the dispatch routine can perform any required processing.
· In an asynchronous I/O response, the IoCompletion routine should perform the post-processing ifIoCallDriver returns STATUS_PENDING. The IoCompletion routine must test the value ofIrp->PendingReturned, as described in “IoCompletion Routines and Asynchronous I/O Responses” earlier in this paper. If the value ofIrp‑>PendingReturned is TRUE, the IoCompletion routine performs the required post-processing.
The operating system uses this exact technique for read requests, write requests, and some I/O control codes (IOCTLs). Consequently, if a driver fails to follow the guidelines in “Summary of Guidelines for Pending IRPs” earlier in this paper, the operating system will perform post-processing twice or not at all
- Handling IRPs 10: Optimizations
- handling IRPs 15: Building IRPs
- Handling IRPs: Introduction
- Handling IRPs 9: Summary of Guidelines for Pending IRPs
- Handling IRPs 4: Completing an IRP
- Handling IRPs 5: Synchronous I/O Responses
- Handling IRPs 6: Asynchronous I/O Responses
- Handling IRPs 8: Propagating the Pending Bit
- handling IRPs 12: Data Transfer Mechanisms
- handling IRPs 16: Debugging I/O Problems
- Handling IRPs: What Every Driver Writer Needs to Know -翻译
- Handling IRPs 7: IoCompletion Routines and Asynchronous I/O Responses
- Handling IRPs 11: Life Cycle of a File Object
- handling IRPs 13: I/O Control Codes (IOCTLs)
- handling IRPs 17: Call to Action and Resources
- Different ways of handling IRPs - cheat sheet (part 2 of 2)
- Handling IRPs: Definition 1: IRP as a Container for an I/O Request
- Handling IRPs: Definition 2: IRP as a Thread-Independent Call Stack
- Handling IRPs 9: Summary of Guidelines for Pending IRPs
- s3c6410 内存分配表
- Jsp和PHP共用80端口,整合Apache和Tomcat
- RTSP的例子终于跑通了,后面再花点时间梳理下,RTSP协议的学习就可以告一段落了,下一站SIP协议!~加油
- Lib-SVM使用说明
- Handling IRPs 10: Optimizations
- 十个iOS面试问题
- 在网站目录后添加反斜杠
- STL学习笔记
- java常见的开源算法支持以及java默认支持的provider
- js中的typeof 操作符
- 内网渗透---常用手法
- Handling IRPs 11: Life Cycle of a File Object
- 浏览器之间的不同