paged pool

Hi.
I am using Paged Pool in my driver. Besides of using it only at IRQL <= DISPATCH_LEVEL, is there anything else I need to know?
I have a complex data structure and I require many small chunks of memory. To avoid memory fragmentation I am first calculating the size of all the memory I need, then I allocate that memory. When building the structure I get piece of that previously allocated memory every time I need. Is this a good idea or is it useless? This data structure is built only once and is not suppose to change after it has been built.
Thanks.

Paged Pool in only for IRQL=PASSIVE_LEVEL and APC_LEVEL, not DISPATCH_LEVEL
and above.

If allocation is fixed size, you could allocate them from lookaside list.

Regards,
Calvin

Calvin Guan, Software Developer xxxxx@nospam.ati.com
SW2D-Radeon NT Core Drivers
ATI Technologies Inc.
1 Commerce Valley Drive East
Markham, Ontario, Canada L3T 7X6
Tel: (905) 882-2600 Ext. 8654
Find a driver: http://www.ati.com/support/driver.html
http:

-----Original Message-----
From: Ratmil Torres [mailto:xxxxx@seg.inf.cu]
Sent: Wednesday, November 26, 2003 8:49 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] paged pool

Hi.
I am using Paged Pool in my driver. Besides of using it only at IRQL <=
DISPATCH_LEVEL, is there anything else I need to know?
I have a complex data structure and I require many small chunks of memory.
To avoid memory fragmentation I am first calculating the size of all the
memory I need, then I allocate that memory. When building the structure I
get piece of that previously allocated memory every time I need. Is this a
good idea or is it useless? This data structure is built only once and is
not suppose to change after it has been built.
Thanks.

Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@ati.com
To unsubscribe send a blank email to xxxxx@lists.osr.com</http:>

Thanks. Sorry, I made a mistake. Instead of IRQL <= DISPATCH_LEVEL I meant IRQL < DISPATCH_LEVEL.
Thank you.

----- Original Message -----
From: Calvin Guan
To: Windows File Systems Devs Interest List
Sent: Wednesday, November 26, 2003 9:01 AM
Subject: [ntfsd] RE: paged pool

Paged Pool in only for IRQL=PASSIVE_LEVEL and APC_LEVEL, not DISPATCH_LEVEL and above.

If allocation is fixed size, you could allocate them from lookaside list.

Regards,
Calvin
Calvin Guan, Software Developer xxxxx@nospam.ati.com
SW2D-Radeon NT Core Drivers
ATI Technologies Inc.
1 Commerce Valley Drive East
Markham, Ontario, Canada L3T 7X6
Tel: (905) 882-2600 Ext. 8654
Find a driver: http://www.ati.com/support/driver.html

-----Original Message-----
From: Ratmil Torres [mailto:xxxxx@seg.inf.cu]
Sent: Wednesday, November 26, 2003 8:49 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] paged pool

Hi.
I am using Paged Pool in my driver. Besides of using it only at IRQL <= DISPATCH_LEVEL, is there anything else I need to know?
I have a complex data structure and I require many small chunks of memory. To avoid memory fragmentation I am first calculating the size of all the memory I need, then I allocate that memory. When building the structure I get piece of that previously allocated memory every time I need. Is this a good idea or is it useless? This data structure is built only once and is not suppose to change after it has been built.
Thanks.

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@ati.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17

You are currently subscribed to ntfsd as: xxxxx@seg.inf.cu
To unsubscribe send a blank email to xxxxx@lists.osr.com

Well, if you driver is FS filter driver there are definitely more to
PagedPool than just raised IRQL.

  1. Your read dispatch code and data must be in NP pool at least to the
    point where you can filter out paging file read.
  2. (just a reminder) Completion routine (even in FS filters) are (by
    design) called at DISPATCH IRQL. So, all the data that you touch in
    completion routines must be in NP pool and protected by a spinlock which
    means that (depending on your locking algorithms) some other data might be
    affected by that and needed to be put into NP pool.

From what you have described with regards to creating your own memory
management solution, I think that you better use lookaside lists. It does
practically the same thing, just better :slight_smile: