Recursive Page Faults

Hi,

What are the restrictions in NT regarding recursive page faults? Mainly I would like to know whether I can take a page fault during paging IO (read / write) dispatch (IRQL <= APC_LEVEL) as long as I guarentee that I will never cause a page fault when IO is taking place against an actual paging file. Is this allowed? Or if I am handling a paging IRP against any file I am not allowed to cause any page faults whatsoever.

Thanks,
Matt

Fault away. Recursive page faults are a regular staple of life in the
file systems stack.

Tony
OSR

As Tony mentioned, you have to be prepared to be re-entered recursively
on the paging path at any time.

If your question was around what the rules are around, how to handle
paging IO, then here goes:

  1. Paging IO cannot take a code page fault. Hence code that handles
    paging IO must be non-paged. If not, the page fault that tries to bring
    in the code to service the page fault can fault again and again till you
    blow the stack.

  2. Paging IO to the page file cannot take a code or data page fault.
    Hence the code that handles paging IO must be non-paged and can only use
    non-paged pool. If not, the page fault that tries to bring in the code
    or data needed to service the page fault can fault again and again till
    you blow the stack.

Hope this helps.

Regards,
Sarosh.
File System Filter Lead
Microsoft Corp

This posting is provided “AS IS” with no warranties, and confers no Rights

xxxxx@yahoo.com wrote:

Hi,

What are the restrictions in NT regarding recursive page faults? Mainly I would like to know whether I can take a page fault during paging IO (read / write) dispatch (IRQL <= APC_LEVEL) as long as I guarentee that I will never cause a page fault when IO is taking place against an actual paging file. Is this allowed? Or if I am handling a paging IRP against any file I am not allowed to cause any page faults whatsoever.

Thanks,
Matt