博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Handling PnP Paging Request
阅读量:7112 次
发布时间:2019-06-28

本文共 2109 字,大约阅读时间需要 7 分钟。

  1. The following explains why the DO_POWER_PAGABLE bit must be set on the way down and not on the way up:

    The power requirements state that if any lower device object sets the DO_POWER_PAGABLE bit, all higher-level drivers must do the same. If the filter driver fails to set the DO_POWER_PAGABLE bit prior to sending the paging request IRP down the stack, it could violate this condition as follows:

    Suppose the filter driver does not set the DO_POWER_PAGABLE bit in its Filter DO before forwarding the paging request IRP to the drivers beneath it in the driver stack. Next suppose that a lower driver sets the DO_POWER_PAGABLE bit in its own DO. Finally, suppose that prior to the completion of the IRP by the filter driver a power IRP occurs. At that point, the DO_POWER_PAGABLE bit would be cleared in the Filter DO but would be set in the DO of the lower-level driver, causing a system crash.

    It is safe to set the DO_POWER_PAGABLE bit before forwarding a paging request down the stack, because there is no longer an active paging file on the filter driver's device, and therefore no more paging I/O will occur on it. If the request to remove this paging file succeeds, the filter driver will be done. If the request fails, the filter driver can restore the original state of its flags by simply clearing the DO_POWER_PAGABLE bit prior to completing the IRP. Because the paging file requests are serialized, there is no danger that some other thread will have modified this bit since the filter driver last altered it.

    译文为:
            电源管理的需求规定了假设一个更低层的设备对象设置了 DO_POWER_PAGABLE 位。那么全部的更高
    层驱动也必须这么做。

    假设过滤驱动没有在下发分页的 IRP 之前设置 DO_POWER_PAGABLE 位,它可能

    违反以下的这些条件:
            如果过滤驱动没有在下发分页 IRP 之前设置 DO_POWER_PAGABLE 位, 再如果下层驱动设置了自己
    的设备对象的 DO_POWER_PAGABLE 位。最后,如果在这个过滤驱动的 IRP 完毕之前。一个电源 IRP 发
    生了。这个时候,DO_POWER_PAGABLE 位将被该过滤驱动清除,但它又被更低层的驱动设置了。就引起
    了一个系统崩溃。
           在一个分页请求下发之前设置 DO_POWER_PAGABLE 位是安全的。由于这里不再有一个活跃的分页文
    件在这个过滤驱动的设备上,因此也不会有分页 I/O 在上面发生。

    假设移除这个页面文件的请求成功

    运行,过滤驱动将会去做,假设请求失败,过滤驱动可以恢复它的标志的原始状态,仅仅须要在完毕这个 
    IRP 之前简单地清除一下 DO_POWER_PAGABLE 位就可以。

    由于页面文件请求是序列化的。即使其他线程在

    过滤驱动最后改变它之后又改动了这个位,这也是没有危急的。
    原文链接: http://msdn.microsoft.com/zh-cn/ff554992

转载地址:http://ktghl.baihongyu.com/

你可能感兴趣的文章
MySQL · 捉虫动态 · UK 包含 NULL 值备库延迟分析
查看>>
windows server 2012 standard Evaluation 安装试用
查看>>
windows server 2008中配置TCP/IP
查看>>
网管必读:交换机技术简介及应用分析
查看>>
.NET多线程编程(9)——Thread类
查看>>
HP DL380G6上安装配置Vmware_ESXI4.1
查看>>
单IP无TMG拓扑Lync Server 2013:活动目录
查看>>
3.VMware vsphere 5.0新体验-安装VMware Center
查看>>
趣题: 一道面试题的解法
查看>>
Java Scoket之java.io.EOFException解决方案
查看>>
Oracle分析函数四——函数RANK,DENSE_RANK,FIRST,LAST…
查看>>
Android应用程序启动过程源代码分析(5)
查看>>
选择目录对话框和选择文件对话框
查看>>
Linux桌面版横评:八、中标普华桌面Linux 3.0.1
查看>>
SystemCenter2012SP1实践(13)虚拟存储的配置
查看>>
一段实现HTML页面内定期触发事件的JavaScript代码
查看>>
支持多核smp squid3.2 缓存反向代理【ok】~
查看>>
[CTO札记]:User与Content的关系
查看>>
让UpdatePanel支持文件上传(5):支持页面重定向的HttpModule
查看>>
Java线程:新特征-阻塞栈
查看>>