Hi,
My driver reports the error STATUS_INSUFFICIENT_RESOURCES during some
operation and asserted. The !vm shows like this:
3: kd> !vm
...............
NonPagedPool Usage: 39462 ( 157848 Kb)
NonPagedPool Max: 65536 ( 262144 Kb)
PagedPool 0 Usage: 3120 ( 12480 Kb)
PagedPool 1 Usage: 9448 ( 37792 Kb)
PagedPool 2 Usage: 9467 ( 37868 Kb)
PagedPool 3 Usage: 9457 ( 37828 Kb)
PagedPool 4 Usage: 9468 ( 37872 Kb)
********** Excessive Paged Pool Usage *****
PagedPool Usage: 40960 ( 163840 Kb)
PagedPool Maximum: 40960 ( 163840 Kb)

********** 1359644 pool allocations have failed **********

Shared Commit: 1214 ( 4856 Kb)
Special Pool: 0 ( 0 Kb)
Shared Process: 3330 ( 13320 Kb)
PagedPool Commit: 40960 ( 163840 Kb)
Driver Commit: 6423 ( 25692 Kb)
Committed pages: 181793 ( 727172 Kb)
Commit limit: 956787 ( 3827148 Kb)
...............

So my questions are:
1. Even though PagedPool is reached its maximum limit, why don't the pages
getting paged out (around 3GB space is still available in pagefile.sys to
commit) and continue?
2. Is there any command in Windbg to find out the total memory usage of
kernel (out of 2GB) from dump file?

NB: Could not able to reproduce the issue with Driver Verifier and !poolused
also not giving anything abnormal.

Thanks,
Deepakumar

Re: Memory got expired by Don

Don
Thu Mar 13 09:25:27 CDT 2008

The PagePool limits are address space, not paging space. The kernel has one
address space for everything, so one an address is allocated it is in use
till freed.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Deepakumar" <Deepakumar@discussions.microsoft.com> wrote in message
news:44105E03-505A-458D-934B-E6C46F5A60D4@microsoft.com...
> Hi,
> My driver reports the error STATUS_INSUFFICIENT_RESOURCES during some
> operation and asserted. The !vm shows like this:
> 3: kd> !vm
> ...............
> NonPagedPool Usage: 39462 ( 157848 Kb)
> NonPagedPool Max: 65536 ( 262144 Kb)
> PagedPool 0 Usage: 3120 ( 12480 Kb)
> PagedPool 1 Usage: 9448 ( 37792 Kb)
> PagedPool 2 Usage: 9467 ( 37868 Kb)
> PagedPool 3 Usage: 9457 ( 37828 Kb)
> PagedPool 4 Usage: 9468 ( 37872 Kb)
> ********** Excessive Paged Pool Usage *****
> PagedPool Usage: 40960 ( 163840 Kb)
> PagedPool Maximum: 40960 ( 163840 Kb)
>
> ********** 1359644 pool allocations have failed **********
>
> Shared Commit: 1214 ( 4856 Kb)
> Special Pool: 0 ( 0 Kb)
> Shared Process: 3330 ( 13320 Kb)
> PagedPool Commit: 40960 ( 163840 Kb)
> Driver Commit: 6423 ( 25692 Kb)
> Committed pages: 181793 ( 727172 Kb)
> Commit limit: 956787 ( 3827148 Kb)
> ...............
>
> So my questions are:
> 1. Even though PagedPool is reached its maximum limit, why don't the pages
> getting paged out (around 3GB space is still available in pagefile.sys to
> commit) and continue?
> 2. Is there any command in Windbg to find out the total memory usage of
> kernel (out of 2GB) from dump file?
>
> NB: Could not able to reproduce the issue with Driver Verifier and
> !poolused
> also not giving anything abnormal.
>
> Thanks,
> Deepakumar



Re: Memory got expired by TomPicard

TomPicard
Thu Mar 13 21:08:00 CDT 2008

> My driver reports the error STATUS_INSUFFICIENT_RESOURCES during "some
> operation" and asserted.

remember STATUS_INSUFFICIENT_RESOURCES is sometimes a catch all failure
can you give us some extra details on what
"some operation" is ?


Re: Memory got expired by Deepakumar

Deepakumar
Thu Mar 13 23:16:01 CDT 2008

>
> remember STATUS_INSUFFICIENT_RESOURCES is sometimes a catch all failure
> can you give us some extra details on what
> "some operation" is ?
>
The operation was RtlQueryRegistryValues (with RelativeTo
RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL).

Re: Memory got expired by Deepakumar

Deepakumar
Thu Mar 13 23:26:01 CDT 2008

"Don Burn" wrote:

> The PagePool limits are address space, not paging space. The kernel has one
> address space for everything, so one an address is allocated it is in use
> till freed.

I Agree with you. That is why I want to know the total kernel adress space
usage from dump file (like !vm shows private address space usage of user
process, e.g., 05d8 winlogon.exe 5809 ( 23236 Kb)). So any way is
there to find out total kernel address space usage?

Re: Memory got expired by Don

Don
Fri Mar 14 07:25:06 CDT 2008

The address space max is fix at either 1GB or 2GB, beyond that the OS has
hard limits for the paged and non-paged pools, so knowing kernel memory
usage does not help alot. You can have very little address space out of 2GB
used, and still hit a pool limit.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


"Deepakumar" <Deepakumar@discussions.microsoft.com> wrote in message
news:F73524DB-F1E1-4E33-9FE3-2E1F49430C21@microsoft.com...
> "Don Burn" wrote:
>
>> The PagePool limits are address space, not paging space. The kernel has
>> one
>> address space for everything, so one an address is allocated it is in use
>> till freed.
>
> I Agree with you. That is why I want to know the total kernel adress space
> usage from dump file (like !vm shows private address space usage of user
> process, e.g., 05d8 winlogon.exe 5809 ( 23236 Kb)). So any way is
> there to find out total kernel address space usage?



Re: Memory got expired by TomPicard

TomPicard
Sat Mar 15 14:55:01 CDT 2008

well if it were my code i'd check
1. can I make an identical RtlQueryRe... call early in my driver load/start
time, prior to excessive memory allocation
2. can i do a successful exallocate() in place of the RtlQurery call
if 1. is not successful and 2. is then something other than excessive
memory use is the issue (ie incorrect call to Rtl), if it's the opposite
then, hard for me to believe, but this rtlQuery call happens to be in just
the wrong spot




"Deepakumar" wrote:

> >
> > remember STATUS_INSUFFICIENT_RESOURCES is sometimes a catch all failure
> > can you give us some extra details on what
> > "some operation" is ?
> >
> The operation was RtlQueryRegistryValues (with RelativeTo
> RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL).