Subject: Re: No swap?
To: David Laight <david@l8s.co.uk>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-embed
Date: 04/09/2002 12:22:50
On Tue, 9 Apr 2002, David Laight wrote:

> On Mon, Apr 08, 2002 at 07:41:36PM -0000, eeh@netbsd.org wrote:
> >
> > So. getting back to the original point, if you really are locking up
> > due to lack of pages, there is nothing that can be done because you
> > simply need more memory than you have on that machin.  However, if
> > you want to handle that situation gracefully, you need to track and
> > limit overcommit.
>
> Would it be sensible (or is it done already?) to let kernel code
> (eg filesystems) specify a 'callback' routine which will be
> called when the system is out of swap (or kva, or...) so they
> can free stuff they are hanging on to because it is likely to
> be needed?

It's not been done. While we could do it, I don't think it would win us
much. I think it would win us a temporary reprieve at best.

The problem (usually) is that userland needs to stop gobbling up so much
memory. As long as the thirst for memory is there, we have a problem.
Which is why killing programs makes sense. I agree we should probably do
better than random killing.. :-)

Take care,

Bill