Driver Failing To Load with /3GB boot.ini switch in WinXP32...

Hi,

I’ve seen a number of older posts on the subject, but nothing that is
helping
me determine the source of the issue - other than there is an insufficient
number of system PTEs. I would like to determine which drivers / modules in

particular may be hogging the system VA resources.

In my particular case I’m failing to map a 16MB bar via
VideoPortGetDeviceBase. Below are some more details, but I’d really like to

understand which modules may be using an excessive ammount of kernel VA
space
causing my 16MB mapping to fail. Any ideas to help narrow this down via
WinDbg?
Thanks!

Before the call to VideoPortGetDeviceBase I see this:
1: kd> !vm

*** Virtual Memory Usage ***
Physical Memory: 785928 ( 3143712 Kb)

************ NO PAGING FILE *********************

Available Pages: 729522 ( 2918088 Kb)
ResAvail Pages: 735483 ( 2941932 Kb)
Locked IO Pages: 16377 ( 65508 Kb)
Free System PTEs: 16110 ( 64440 Kb)
Free NP PTEs: 8174 ( 32696 Kb)
Free Special NP: 0 ( 0 Kb)
Modified Pages: 478 ( 1912 Kb)
Modified PF Pages: 140 ( 560 Kb)
NonPagedPool Usage: 4191 ( 16764 Kb)
NonPagedPool Max: 38142 ( 152568 Kb)
PagedPool 0 Usage: 1988 ( 7952 Kb)
PagedPool 1 Usage: 201 ( 804 Kb)
PagedPool 2 Usage: 198 ( 792 Kb)
PagedPool 3 Usage: 192 ( 768 Kb)
PagedPool 4 Usage: 190 ( 760 Kb)
PagedPool Usage: 2769 ( 11076 Kb)
PagedPool Maximum: 40960 ( 163840 Kb)
Shared Commit: 48 ( 192 Kb)
Special Pool: 0 ( 0 Kb)
Shared Process: 155 ( 620 Kb)
PagedPool Commit: 2769 ( 11076 Kb)
Driver Commit: 2110 ( 8440 Kb)
Committed pages: 5122 ( 20488 Kb)
Commit limit: 751123 ( 3004492 Kb)

Total Private: 7 ( 28 Kb)
0004 System 7 ( 28 Kb)

Directly after the call to VideoPortGetDeviceBase I see this:

1: kd> !vm

*** Virtual Memory Usage ***
Physical Memory: 785928 ( 3143712 Kb)

************ NO PAGING FILE *********************

Available Pages: 729522 ( 2918088 Kb)
ResAvail Pages: 735483 ( 2941932 Kb)
Locked IO Pages: 16377 ( 65508 Kb)
Free System PTEs: 16110 ( 64440 Kb)

******* 1 system PTE allocations have failed ******

Free NP PTEs: 8174 ( 32696 Kb)
Free Special NP: 0 ( 0 Kb)
Modified Pages: 478 ( 1912 Kb)
Modified PF Pages: 140 ( 560 Kb)
NonPagedPool Usage: 4191 ( 16764 Kb)
NonPagedPool Max: 38142 ( 152568 Kb)
PagedPool 0 Usage: 1988 ( 7952 Kb)
PagedPool 1 Usage: 201 ( 804 Kb)
PagedPool 2 Usage: 198 ( 792 Kb)
PagedPool 3 Usage: 192 ( 768 Kb)
PagedPool 4 Usage: 190 ( 760 Kb)
PagedPool Usage: 2769 ( 11076 Kb)
PagedPool Maximum: 40960 ( 163840 Kb)
Shared Commit: 48 ( 192 Kb)
Special Pool: 0 ( 0 Kb)
Shared Process: 155 ( 620 Kb)
PagedPool Commit: 2769 ( 11076 Kb)
Driver Commit: 2110 ( 8440 Kb)
Committed pages: 5122 ( 20488 Kb)
Commit limit: 751123 ( 3004492 Kb)

Total Private: 7 ( 28 Kb)
0004 System 7 ( 28 Kb)

The thing is that there appear to be plenty of system ptes available to
map your BAR, so the failure is most likely an inability to find a large
enough block of them to satisfy your request. Perhaps you could step
through MmMapIoSpace to see which Mi* routine is actually failing the
allocation. Are you not doing the allocation at boot time?


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Todd Poynter
Sent: Thursday, April 19, 2007 12:08 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Driver Failing To Load with /3GB boot.ini switch in
WinXP32…

Hi,

I’ve seen a number of older posts on the subject, but nothing that is
helping
me determine the source of the issue - other than there is an
insufficient
number of system PTEs. I would like to determine which drivers /
modules in
particular may be hogging the system VA resources.

In my particular case I’m failing to map a 16MB bar via
VideoPortGetDeviceBase. Below are some more details, but I’d really
like to
understand which modules may be using an excessive ammount of kernel VA
space
causing my 16MB mapping to fail. Any ideas to help narrow this down via
WinDbg?
Thanks!

Before the call to VideoPortGetDeviceBase I see this:
1: kd> !vm

*** Virtual Memory Usage ***
Physical Memory: 785928 ( 3143712 Kb)

************ NO PAGING FILE *********************

Available Pages: 729522 ( 2918088 Kb)
ResAvail Pages: 735483 ( 2941932 Kb)
Locked IO Pages: 16377 ( 65508 Kb)
Free System PTEs: 16110 ( 64440 Kb)
Free NP PTEs: 8174 ( 32696 Kb)
Free Special NP: 0 ( 0 Kb)
Modified Pages: 478 ( 1912 Kb)
Modified PF Pages: 140 ( 560 Kb)
NonPagedPool Usage: 4191 ( 16764 Kb)
NonPagedPool Max: 38142 ( 152568 Kb)
PagedPool 0 Usage: 1988 ( 7952 Kb)
PagedPool 1 Usage: 201 ( 804 Kb)
PagedPool 2 Usage: 198 ( 792 Kb)
PagedPool 3 Usage: 192 ( 768 Kb)
PagedPool 4 Usage: 190 ( 760 Kb)
PagedPool Usage: 2769 ( 11076 Kb)
PagedPool Maximum: 40960 ( 163840 Kb)
Shared Commit: 48 ( 192 Kb)
Special Pool: 0 ( 0 Kb)
Shared Process: 155 ( 620 Kb)
PagedPool Commit: 2769 ( 11076 Kb)
Driver Commit: 2110 ( 8440 Kb)
Committed pages: 5122 ( 20488 Kb)
Commit limit: 751123 ( 3004492 Kb)

Total Private: 7 ( 28 Kb)
0004 System 7 ( 28 Kb)

Directly after the call to VideoPortGetDeviceBase I see this:

1: kd> !vm

*** Virtual Memory Usage ***
Physical Memory: 785928 ( 3143712 Kb)

************ NO PAGING FILE *********************

Available Pages: 729522 ( 2918088 Kb)
ResAvail Pages: 735483 ( 2941932 Kb)
Locked IO Pages: 16377 ( 65508 Kb)
Free System PTEs: 16110 ( 64440 Kb)

******* 1 system PTE allocations have failed ******

Free NP PTEs: 8174 ( 32696 Kb)
Free Special NP: 0 ( 0 Kb)
Modified Pages: 478 ( 1912 Kb)
Modified PF Pages: 140 ( 560 Kb)
NonPagedPool Usage: 4191 ( 16764 Kb)
NonPagedPool Max: 38142 ( 152568 Kb)
PagedPool 0 Usage: 1988 ( 7952 Kb)
PagedPool 1 Usage: 201 ( 804 Kb)
PagedPool 2 Usage: 198 ( 792 Kb)
PagedPool 3 Usage: 192 ( 768 Kb)
PagedPool 4 Usage: 190 ( 760 Kb)
PagedPool Usage: 2769 ( 11076 Kb)
PagedPool Maximum: 40960 ( 163840 Kb)
Shared Commit: 48 ( 192 Kb)
Special Pool: 0 ( 0 Kb)
Shared Process: 155 ( 620 Kb)
PagedPool Commit: 2769 ( 11076 Kb)
Driver Commit: 2110 ( 8440 Kb)
Committed pages: 5122 ( 20488 Kb)
Commit limit: 751123 ( 3004492 Kb)

Total Private: 7 ( 28 Kb)
0004 System 7 ( 28 Kb)

— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hi Mark,

> The thing is that there appear to be plenty of system ptes available to
map your BAR, so the failure is most likely an inability to find a large
enough block of them to satisfy your request.

Exactly, there does appear to be enough PTEs, but I imagine the issue is a lack of a contigous range. I’d like to verify this beyond conjecture and understand which components in the system may be using an abundance of the kernel VA. Essentially I’d like a kernel VA map with size by module.

> Are you not doing the allocation at boot time?

Yes, we are doing this during boot, to be specific during FindAdapter.

!sysptes will show you the block structure of the pte lists, including
largest contiguous free block information, but I have a nagging
suspicion that it doesn’t always work.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Thursday, April 19, 2007 12:59 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Driver Failing To Load with /3GB boot.ini switch in
WinXP32…

Hi Mark,

> The thing is that there appear to be plenty of system ptes available
to
map your BAR, so the failure is most likely an inability to find a large
enough block of them to satisfy your request.

Exactly, there does appear to be enough PTEs, but I imagine the issue is
a lack of a contigous range. I’d like to verify this beyond conjecture
and understand which components in the system may be using an abundance
of the kernel VA. Essentially I’d like a kernel VA map with size by
module.

> Are you not doing the allocation at boot time?

Yes, we are doing this during boot, to be specific during FindAdapter.


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks again Mark! !sysptes definitely gives me some more information to go off of. Directly before we fail to map 16MB:

1: kd> !sysptes

System PTE Information
Total System Ptes 46817
SysPtes list of size 1 has 139 free
SysPtes list of size 2 has 58 free
SysPtes list of size 4 has 36 free
SysPtes list of size 8 has 37 free
SysPtes list of size 16 has 26 free

starting PTE: c0758000
ending PTE: c07b3700

free blocks: 19 total free: 20464 largest free block: 4024

The largest block free is 4024*4=16096 Kb. Our 16 MB bar is 16*1024=16384 Kb.

16384 - 16096 = 288. We would need an additional 288 Kb.

Does anyone happen to know if there is a way to view System PTE usage per module using WinDbg? Perhaps I need to subscribe to the WinDbg alias. :slight_smile:

xxxxx@gmail.com wrote:

Does anyone happen to know if there is a way to view System PTE usage per module using WinDbg?

What do you mean by “per module”? You can track pool usage by tag, but
nothing in the system knows which driver made which allocations. And
allocations are not tracked by PTE.

Perhaps I need to subscribe to the WinDbg alias. :slight_smile:

Well, it doesn’t cost anything to do so…


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Tim. That makes since that they track allocs by tag since you pass one it. Looking through the WinDbg help I see !poolused which may do what I want. It costs time. :slight_smile: