Subject: "swap lock" problem with NetBSD VM
To: None <tech-kern@NetBSD.ORG, dyson@NetBSD.ORG>
From: Laine Stump <laine@MorningStar.Com>
List: tech-kern
Date: 09/17/1996 22:28:59
John Dyson writes:

> Try this.  Sleeping on lbolt is a bit bogus.  Waking up on vm_pages_needed
> is likely more correct, with a timeout of some reasonable amount of time.
> (I don't know what the hz variable is on NetBSD, so I just filled in a
> number.)  No guarantees -- this fix (if I think what the problem is)
> is not quite correct.  A correct fix is much much more complex :-).

Today I tried this on 2 highly used P6-200s and the difference in
robustness was nothing short of phenomenal. It is now almost impossible
to exhaust free real-mem, and when it does get exhausted, it stays that
way for less than a second. AND - ZERO LOCKUPS no matter how hard we
tried! (3 people running gmake -j25 of a several hundred source files)

Regardless of whether this is a 100% "correct" solution or not, it is in
my opinion enough better than the current code that it should be
committed ASAP. So what if it's not 100% proper - neither is what's
there now (apparently not by a long shot).

It would sure be nice if this was in the released code so that the
performance of stock NetBSD under heavy load was not so embarrassing
(no, I don't want to hear any of that bull about "instead of putting
this fix in, we should do a new implementation that is pure and whole
and politically correct" - this is the real world! If you feel like
saying that, say it to someone else.)  Failing that, I would heartily
recommend it to anyone who sometimes oversteps the bounds of their real
memory.

Thanks John! You'll be disappointed to know that you have singlehandedly
prevented me from further investigating FreeBSD :-)

By the way, this same fix works on OpenBSD (as would be expected), so it
should probably be put in there too.

Laine Stump
Ascend Communications