Page pool Error ?

Hi,
I’ve a filter driver which holds write IRP to a volume till a certain action
is performed. I build a node (16 Bytes) containing IRP and place it in a
queue. My questions

  1. Will large number of memory allocations of 16 Bytes and subsequent
    freeing them, cause page pool memory fragmentation? I understand issue with
    Page Fault etc. But should it slow down my application in a gradual manner?
  2. does the memsnap/poolmon tool, give exact memory usage by the driver? I
    am seeing a number which I believe our driver is not consuming.

Will large chunk memory allocation at a time and then managing the smaller
alloc/free inside my driver help?

Please give your comments/thoughts on the above issues.

TIA,
Pash

Page pool Error ? Use the lookaside list for such.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: Pashupati Kumar
To: Windows System Software Devs Interest List
Sent: Thursday, July 28, 2005 9:15 AM
Subject: [ntdev] Page pool Error ?

Hi,
I’ve a filter driver which holds write IRP to a volume till a certain action is performed. I build a node (16 Bytes) containing IRP and place it in a queue. My questions

  1. Will large number of memory allocations of 16 Bytes and subsequent freeing them, cause page pool memory fragmentation? I understand issue with Page Fault etc. But should it slow down my application in a gradual manner?

  2. does the memsnap/poolmon tool, give exact memory usage by the driver? I am seeing a number which I believe our driver is not consuming.

Will large chunk memory allocation at a time and then managing the smaller alloc/free inside my driver help?

Please give your comments/thoughts on the above issues.

TIA,
Pash


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

You could use the Cancel Safe Queuing mechanism to build the Q. that way
you won’t have to allocate anything.

If I recollect it right, CSQ uses DriverContext within the IRP to build
the Q.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pashupati Kumar
Sent: Wednesday, July 27, 2005 10:15 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Page pool Error ?

Hi,
I’ve a filter driver which holds write IRP to a volume till a certain
action is performed. I build a node (16 Bytes) containing IRP and place
it in a queue. My questions

  1. Will large number of memory allocations of 16 Bytes and subsequent
    freeing them, cause page pool memory fragmentation? I understand issue
    with Page Fault etc. But should it slow down my application in a gradual
    manner?

  2. does the memsnap/poolmon tool, give exact memory usage by the driver?
    I am seeing a number which I believe our driver is not consuming.

Will large chunk memory allocation at a time and then managing the
smaller alloc/free inside my driver help?

Please give your comments/thoughts on the above issues.

TIA,
Pash


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

The IRP itself contains fields (Tail.Overlay.DriverContext) that are
available for the use of the IRP owner. By ‘owner’ here I mean that your
driver has accepted the IRP in its dispatch routine and has not released the
IRP by calling IoCompleteRequest.Specifically these fields are intended to
be used for queuing IRPs while your driver owns the IRP. As somebody else
pointed out, your should use the ‘cancel safe queues’ facility, which will
use these fields internally for queuing IRPs. Finally, as Maxim pointed out,
in the more general case, small fixed length allocations should be made out
of driver internal lookaside lists in order to reduce fragmentation.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pashupati Kumar
Sent: Thursday, July 28, 2005 1:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Page pool Error ?

Hi,
I’ve a filter driver which holds write IRP to a volume till a certain action
is performed. I build a node (16 Bytes) containing IRP and place it in a
queue. My questions

  1. Will large number of memory allocations of 16 Bytes and subsequent
    freeing them, cause page pool memory fragmentation? I understand issue with
    Page Fault etc. But should it slow down my application in a gradual manner?

  2. does the memsnap/poolmon tool, give exact memory usage by the driver? I
    am seeing a number which I believe our driver is not consuming.

Will large chunk memory allocation at a time and then managing the smaller
alloc/free inside my driver help?

Please give your comments/thoughts on the above issues.

TIA,
Pash


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

CSQ uses one of the DriverContext fields IIRC, the other 3 are free for
you to use. 3 PVOIDs + Tail.Overlay.ListEntry sound like you can put
your 16 bytes w/in the irp itself.

d


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harish Arora
Sent: Thursday, July 28, 2005 12:23 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Page pool Error ?

You could use the Cancel Safe Queuing mechanism to build the Q. that way
you won’t have to allocate anything.

If I recollect it right, CSQ uses DriverContext within the IRP to build
the Q.


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pashupati Kumar
Sent: Wednesday, July 27, 2005 10:15 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Page pool Error ?

Hi,
I’ve a filter driver which holds write IRP to a volume till a certain
action is performed. I build a node (16 Bytes) containing IRP and place
it in a queue. My questions

  1. Will large number of memory allocations of 16 Bytes and subsequent
    freeing them, cause page pool memory fragmentation? I understand issue
    with Page Fault etc. But should it slow down my application in a gradual
    manner?

  2. does the memsnap/poolmon tool, give exact memory usage by the driver?
    I am seeing a number which I believe our driver is not consuming.

Will large chunk memory allocation at a time and then managing the
smaller alloc/free inside my driver help?

Please give your comments/thoughts on the above issues.

TIA,
Pash


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

OLE_LINK2OLE_LINK1OLE_LINK3OLE_LINK4OLE_LINK5At this time we were more
inclined to use lookaside list as we have a generic requirement for storing
the data along with IRP. Thanks for pointing to CSQ as another possible
option.


From: Mark Roddy [mailto:xxxxx@hollistech.com]
Sent: Thursday, July 28, 2005 4:32 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Page pool Error ?

The IRP itself contains fields (Tail.Overlay.DriverContext) that are
available for the use of the IRP owner. By ‘owner’ here I mean that your
driver has accepted the IRP in its dispatch routine and has not released the
IRP by calling IoCompleteRequest.Specifically these fields are intended to
be used for queuing IRPs while your driver owns the IRP. As somebody else
pointed out, your should use the ‘cancel safe queues’ facility, which will
use these fields internally for queuing IRPs. Finally, as Maxim pointed out,
in the more general case, small fixed length allocations should be made out
of driver internal lookaside lists in order to reduce fragmentation.

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Pashupati Kumar
Sent: Thursday, July 28, 2005 1:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Page pool Error ?

Hi,
I’ve a filter driver which holds write IRP to a volume till a certain action
is performed. I build a node (16 Bytes) containing IRP and place it in a
queue. My questions

  1. Will large number of memory allocations of 16 Bytes and subsequent
    freeing them, cause page pool memory fragmentation? I understand issue with
    Page Fault etc. But should it slow down my application in a gradual manner?

  2. does the memsnap/poolmon tool, give exact memory usage by the driver? I
    am seeing a number which I believe our driver is not consuming.

Will large chunk memory allocation at a time and then managing the smaller
alloc/free inside my driver help?

Please give your comments/thoughts on the above issues.

TIA,
Pash


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com