Handling PnP Paging Request

  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

时间: 2024-12-13 16:06:31

Handling PnP Paging Request的相关文章

Unable to handle kernel paging request at virtual address

kernel里调试时写alc5642时机器会时而重启,终于抓到了log,如下: Unable to handle kernel paging request at virtual address xxxx 网上一搜,如下: Restarting system. Unable to handle kernel paging request at virtual address b13bffe0 pgd = c9184000 [b13bffe0] *pgd=00000000 Internal err

ddr不稳定导致1-bit error引起kernel panic(Unable to handle kernel paging request )

Panic log: [ 939.136378] c0 11060 (kworker/u8:5) binder: release 29969:29969 transaction 41327 out, still active [ 951.095433] c1 1026 (Binder_6) binder: 644:1026 transaction failed 29189, size 18336-0 [ 951.103360] c1 1026 (Binder_6) binder: send fa

Unable to handle kernel paging request at virtual address 0x7e005070 解决办法

有点标题党的味道了~ 对于readl() 和 inl() 读取I/O端口报错的探究 给s3c6410的RTC写demo driver的时候遇到这个问题... 如图 这是虚拟内存技术导致的问题,不能直接使用物理地址(不过这里有个疑问,我上次给PC写的CMOS driver貌似用的是物理地址,布吉岛为嘛) 解决办法就是调用ioremap函数转换物理地址,重新映射IO端口到虚拟地址中 Once equipped with ioremap (and iounmap), a device driver c

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

整个spring mvc的架构如下图所示: 上篇文件讲解了DispatcherServlet通过request获取控制器Controller的过程,现在来讲解DispatcherServletDispatcherServlet的第二步:通过request从Controller获取ModelAndView. DispatcherServlet调用Controller的过程: DispatcherServlet.java doService()--->doDispatch()--->handler

Drf04 / drf request请求对象封装、版本、认证、权限

目录 Drf04 / drf request请求对象封装.版本.认证.权限 回顾和补充 今日详细 1.请求的封装 2.版本 3.认证(面试) 4.权限 Drf04 / drf request请求对象封装.版本.认证.权限 回顾和补充 restful规范 1. 建议用https代替http 2. 在URL中体现api,添加api标识 https://www.cnblogs.com/xwgblog/p/11812244.html # 错误 https://www.cnblogs.com/api/xw

Windows 错误代码

Error Messages for Windows http://www.gregorybraun.com/MSWINERR.ZIP Server 4.0 Error Messages   Code Error Message 0 操作成功完成. 1 函数不正确. 2 系统找不到指定的文件. 3 系统找不到指定的路径. 4 系统无法打开文件. 5 拒绝访问. 6 句柄无效. 7 存储控制块被损坏. 8 存储空间不足,无法处理此命令. 9 存储控制块地址无效. 10 环境不正确. 11 试图加载

ExtJS远程数据-本地分页

背景 一般情况下,分页展示是前端只负责展示,后台通过SQL语句实现分页查询.当总数据量在千条以下,适合一次性查询出符合条件的所有数据,让前端页面负责分页也是一种选择. 实例 现通过ExtJS 4扩展类库Ext.ux.data.PagingStore来实现分页,建议使用前在GitHub获取最新版本. 使用时非常简单,只需将Store的继承类改为“Ext.ux.data.PagingStore”,其他分页配置可参照之前的文章<ExtJS实现分页grid paging>. Ext.define('X

Delphi I/O Errors(几百种不同的错误)

The following are the Windows API (and former DOS) IO errors, which are also the IO errors often returned by Delphi programs, and which are generally difficult to find reference for, and are especially difficult to find referenced as Delphi errors. S

Windows Error Codes

http://www.briandunning.com/error-codes/?source=Windows Windows Error Codes List All Error Codes | Search Errors: FileMaker Error Codes Lasso Error Codes MySQL Error Codes Windows System Errors About this databaseThis is a free public resource. It is