Subject: Re: Does NetBSD overcommit swap space?
To: Alan Barrett <apb@iafrica.com>
From: Eduardo E. Horvath <eeh@one-o.com>
List: tech-userlevel
Date: 07/15/1999 08:18:55
Moving this over to tech-kern, where it really belongs.

On Thu, 15 Jul 1999, Alan Barrett wrote:

> OK, so does NetBSD overcommit, or not?  Which man pages tell me?

Yes.  AFAIK it does not have the necessary accounting in place to keep
track of the swap space it has (to borrow SVR4 terminology) reserved but
not allocated.

[...]

> Speculation:
> 
>     It might be useful if a process could ask the kernel something like
>     "Please pretend to give me 1GB of space, but note that I intend to
>     use it very sparsely; I promise not to touch more than 5000 512-byte
>     pages within the 1GB block, and I want to receive a SIGDANGER signal
>     if I don't keep this promise."

In order to do something like this, the kernel would need to keep track of
swap space that has been reserved, which I hope is planned.  Once you
start tracking reserved space you can redily detect overcommitment and
start failing allocation requests with ENOMEM.  

=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me