> Interestingly enough, if the application is doing
only single Read/WriteFileEx, the BSOD does not happen. The BSOD pops when
the application has 4 or more concurrent Read/WriteFileEx active and
pending.
This would seem to indicate that you are not suffering from cumulative
leaks of PTEs. Instead, due to having multiple mappings outstanding at
the same time, you are simply mapping too much memory, consuming all
the available PTEs. How big are the I/Os pending? The default setting
I think allows 10000 system PTEs, so 40K kilobytes (39 MB) can be mapped
into system space. Some of that is used by the kernel (NP pool and the
like). What’s left can easily be exhausted by several multi-megabyte
mappings (or even one big many-megabyte mapping)
You can increase allowed system PTEs, up to 50000, which gives you
about 170 MB to work with, but this is still finite and can be consumed
simply by scaling the number and/or size of the pending I/Os.
When I had this problem, I didn’t really need a pointer to the memory,
so I redesigned my several related drivers to use MDLs alone, without
mapping. If you must see or manipulate the memory (encryption?) then
you must map, and you may have to come up with some sort of throttling
scheme to prevent the massive parallelism that is leading to the crash.
And you’d have to split huge I/Os that could singly require too many
PTEs.
Dave Cox
Hewlett-Packard Co.
NSSO/SANS/SMSO (Santa Barbara)
https://ecardfile.com/id/Dave+Cox
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com