freebsd-dev/sys/alpha
Mike Silbersack 7f3a40933b Fix a horribly suboptimal algorithm in the vm_daemon.
In order to determine what to page out, the vm_daemon checks
reference bits on all pages belonging to all processes.  Unfortunately,
the algorithm used reacted badly with shared pages; each shared page
would be checked once per process sharing it; this caused an O(N^2)
growth of tlb invalidations.  The algorithm has been changed so that
each page will be checked only 16 times.

Prior to this change, a fork/sleepbomb of 1300 processes could cause
the vm_daemon to take over 60 seconds to complete, effectively
freezing the system for that time period.  With this change
in place, the vm_daemon completes in less than a second.  Any system
with hundreds of processes sharing pages should benefit from this change.

Note that the vm_daemon is only run when the system is under extreme
memory pressure.  It is likely that many people with loaded systems saw
no symptoms of this problem until they reached the point where swapping
began.

Special thanks go to dillon, peter, and Chuck Cranor, who helped me
get up to speed with vm internals.

PR:		33542, 20393
Reviewed by:	dillon
MFC after:	1 week
2002-02-27 18:03:02 +00:00
..
alpha Fix a horribly suboptimal algorithm in the vm_daemon. 2002-02-27 18:03:02 +00:00
compile Don't need the .keep_me files. Obrien and I committed past each other. 2001-07-01 23:35:44 +00:00
conf Remove WITNESS from GENERIC by default: as we grow more locks, this gets 2002-02-13 07:44:59 +00:00
include Add the following functions/macros to support byte order conversions and 2002-02-27 17:16:18 +00:00
isa Don't grab the ICU lock while reading the current pending interrupts and 2002-02-08 18:30:36 +00:00
linux Bah, I managed to turn cosmetic things into real bugs. Fix shadowed 2002-02-08 08:56:01 +00:00
mcbus Introduce a standard name for the lock protecting an interrupt controller 2001-12-20 23:48:31 +00:00
osf1 Fix a long line introduced in previous commit. 2002-02-07 22:29:41 +00:00
pci Introduce a standard name for the lock protecting an interrupt controller 2001-12-20 23:48:31 +00:00
tc Replace the MFREE that Marshal (Quick Draw) Dillon apparently didn't look for. 2002-02-07 08:39:26 +00:00
tlsb Introduce a standard name for the lock protecting an interrupt controller 2001-12-20 23:48:31 +00:00
Makefile Add a dopey makefile to do the tags dance, which is probably not perfect 2000-12-31 23:26:34 +00:00