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

Handling PnP Paging Request的更多相关文章

  1. Unable to handle kernel paging request at virtual address

    1.Unable to handle kernel paging request at virtual address 00000000 =====>越出内核地址空间范围,原因是由于使用空NUL ...

  2. An error occured while handling a json request

    修复方法: sudo pip install werkzeug==0.8.3

  3. spring mvc DispatcherServlet详解之二---request通过Controller获取ModelAndView过程

    整个spring mvc的架构如下图所示: 上篇文件讲解了DispatcherServlet通过request获取控制器Controller的过程,现在来讲解DispatcherServletDisp ...

  4. System Error Codes

    很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...

  5. mm/memory

    /* *  linux/mm/memory.c * *  Copyright (C) 1991, 1992  Linus Torvalds */ /* * demand-loading started ...

  6. ExtJS远程数据-本地分页

    背景 一般情况下,分页展示是前端只负责展示,后台通过SQL语句实现分页查询.当总数据量在千条以下,适合一次性查询出符合条件的所有数据,让前端页面负责分页也是一种选择. 实例 现通过ExtJS 4扩展类 ...

  7. Windows 错误代码

    Error Messages for Windows http://www.gregorybraun.com/MSWINERR.ZIP Server 4.0 Error Messages   Code ...

  8. [转]Delphi I/O Errors

    The following are the Windows API (and former DOS) IO errors, which are also the IO errors often ret ...

  9. [转]ASP.NET web API 2 OData enhancements

    本文转自:https://www.pluralsight.com/blog/tutorials/asp-net-web-api-2-odata-enhancements Along with the ...

随机推荐

  1. SqlServer学习-常用的sql语句-持续更新中

    1.获取数据库下的所有表名 select TABLE_NAME from information_schema.tables where TABLE_TYPE='Base TABLE' 2.随机取出1 ...

  2. 十年后我不会log,还是活的很好啊

    混迹于互联网也一两年了,出于喜爱与生活压力依然会从事很久.迟迟不写博客,大概是觉得知识与经验积累在笔记上时不时看看就好了,而实际情况是笔记很少翻,遇到问题搜博客和百度依然是首选,故开通博客记录自己工作 ...

  3. KM算法(Kuhn-Munkres)

    算法理论基础: 可行顶点标号 用l(v)表示顶点v的标号,w(uv)表示边(u,v)的权,对于赋权二分图G=(X,Y),若对每条边e=xy,均有l(x)+l(y)>=w(xy),则称这个标号为G ...

  4. Apache添加到windows服务和移除Apache的windows服务

    Apache添加到windows服务和移除Apache的windows服务 Apache免安装版将其添加到Windows服务中: 打开cmd控制台,在上面输入"你的Apache安装目录\bi ...

  5. [转]Linux中进程内存与cgroup内存的统计

    From: http://hustcat.github.io/about/ Linux中进程内存与cgroup内存的统计 在Linux内核,对于进程的内存使用与Cgroup的内存使用统计有一些相同和不 ...

  6. iOS的影片播放 MediaPlayer 和 AVPlayer

    在iOS開發上,如果遇到需要播放影片,如開機動畫…,我們很習慣地會使用MediaPlayer來播放影片,因為很方便使用,所以就一直使用下去.但是隨著客戶的要求越來越嚴苛,尤其是過場動畫或互動效果上的表 ...

  7. 如何防止XshellPortable、putty、SecureCRT等断网造成Linux命令中断

    在使用XshellPortable.putty.SecureCRT等工具远程连接Linux系统时,如果我们执行了一大堆命令,在命令尚未执行完毕,客户端突然断网或者XshellPortable.putt ...

  8. Struts2的介绍

    Struts2的介绍 制作人:全心全意 Struts引用的是MVC(Model-View-Controller,模型-视图-控制器)设计理念.目前,JavaWeb应用MVC设计理念的框架有很多,如St ...

  9. 67.基于nested object实现博客与评论嵌套关系

    1.做一个实验,引出来为什么需要nested object 冗余数据方式的来建模,其实用的就是object类型,我们这里又要引入一种新的object类型,nested object类型 博客,评论,做 ...

  10. CentOS7 安装 PHP7.2

    点击查看原文 安装源 安装 EPEL 软件包: $ sudo yum install epel-release 安装 remi 源: $ sudo yum install http://rpms.re ...