Non Pageable memory - for drivers

Hi,

I am relatively new into windows driver domain. Have done drivers on
other OSes. While reading the msdn library, one thing struck me was that
the low level drivers should allocate non-pageable memory for its data
structures!

I cannot imagine scenarios where the driver data structures (unless some
command structure (or some other info block) needs to be DMA’ed by the
device), should always be resident in memory.

Will the experts pelase explain?

Thanks in advance,
-chandra.

The definition of a pageable page is that it can be ‘paged’ out to a
page file. The act of writing this page to disk requires sending I/O
requests to the filesystem maintaining the structure of the volume, and
the filesystem will then send on its own I/O requests to the volume disk
driver controlling the storage hardware. If the filesystem driver or
volume driver themselves touch pageable memory while already handling a
page file I/O requests, you’d have an infinite recursion problem. The
code that handles page file I/O requests can’t depend on itself to
satisfy its own page faults!

  • Nicholas Ryan

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Friday, October 25, 2002 3:22 PM
To: Kernel Debugging Interest List
Subject: [windbg] Non Pageable memory - for drivers

Hi,

I am relatively new into windows driver domain. Have done
drivers on other OSes. While reading the msdn library, one
thing struck me was that the low level drivers should
allocate non-pageable memory for its data structures!

I cannot imagine scenarios where the driver data structures
(unless some command structure (or some other info block)
needs to be DMA’ed by the device), should always be resident
in memory.

Will the experts pelase explain?

Thanks in advance,
-chandra.


You are currently subscribed to windbg as: xxxxx@nryan.com
To unsubscribe send a blank email to %%email.unsub%%

Also, if the memory allocated for the data structure has been paged out, and if it needs to be accesed at elevated IRQLs, the page fault handler cannot be invoked at IRQLs dispatch and higher.

m

-----Original Message-----
From: Nicholas Ryan [mailto:xxxxx@nryan.com]
Sent: Friday, October 25, 2002 3:43 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Non Pageable memory - for drivers

The definition of a pageable page is that it can be ‘paged’ out to a
page file. The act of writing this page to disk requires sending I/O
requests to the filesystem maintaining the structure of the volume, and
the filesystem will then send on its own I/O requests to the volume disk
driver controlling the storage hardware. If the filesystem driver or
volume driver themselves touch pageable memory while already handling a
page file I/O requests, you’d have an infinite recursion problem. The
code that handles page file I/O requests can’t depend on itself to
satisfy its own page faults!

  • Nicholas Ryan

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@hotmail.com
Sent: Friday, October 25, 2002 3:22 PM
To: Kernel Debugging Interest List
Subject: [windbg] Non Pageable memory - for drivers

Hi,

I am relatively new into windows driver domain. Have done
drivers on other OSes. While reading the msdn library, one
thing struck me was that the low level drivers should
allocate non-pageable memory for its data structures!

I cannot imagine scenarios where the driver data structures
(unless some command structure (or some other info block)
needs to be DMA’ed by the device), should always be resident
in memory.

Will the experts pelase explain?

Thanks in advance,
-chandra.


You are currently subscribed to windbg as: xxxxx@nryan.com
To unsubscribe send a blank email to %%email.unsub%%


You are currently subscribed to windbg as: xxxxx@troikanetworks.com
To unsubscribe send a blank email to %%email.unsub%%