Subject: Re: NetBSD1.6 UVM problem?
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 12/11/2002 01:02:05
> It might be useful to have a call (or a flag to mlock) that says
> "make sure that I have vm resources sufficiently allocated to ensure
> that I won't be killed due to vm shortages, on the condition that I
> don't request any further pages of memory".
I think that flag is already permanently set, since I don't think
processes are ever killed for VM shortages.
The resource that is in short supply in the circumstance in question is
*physical* pages: the kill happens when a process takes a page fault on
a perfectly good virtual page that doesn't have a physical page at the
moment, and the fault handler gets failure when trying to allocate a
physical page for it.
This does imply a VM crunch, because this can't happen until swap is
full - otherwise something is paged out to make room. (Well, or unless
too much stuff is locked in core; there are limits to prevent that from
happening, but they presumably could in principle be set
inappropriately.)
> Obviously any request for further resources will have to be treated
> with the same way as we treat other requests for resources: it might
> be refused.
And if that `request' takes the form of a page fault? There is no
overt way to refuse a page fault; that's where we came in.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B