1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00
freebsd/sys/vm
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
..
default_pager.c
device_pager.c
phys_pager.c
pmap.h Fix a horribly suboptimal algorithm in the vm_daemon. 2002-02-27 18:03:02 +00:00
swap_pager.c GC: BIO_ORDERED, various infrastructure dealing with BIO_ORDERED. 2002-02-22 09:26:35 +00:00
swap_pager.h
vm_contig.c contigmalloc1() could cause the vm_page_zero_count to become incorrect. 2001-10-17 17:34:34 +00:00
vm_extern.h Pre-KSE/M3 commit. 2002-02-07 20:58:47 +00:00
vm_fault.c Changes to make the OOM killer much more effective: 2002-02-19 18:34:02 +00:00
vm_glue.c Remove unused variable (td) 2002-02-26 01:01:37 +00:00
vm_init.c
vm_kern.c vm/vm_kern.c: rate limit (to once per second) diagnostic printf when 2001-12-01 00:21:30 +00:00
vm_kern.h
vm_map.c Fix a race with free'ing vmspaces at process exit when vmspaces are 2002-02-05 21:23:05 +00:00
vm_map.h Fix a race with free'ing vmspaces at process exit when vmspaces are 2002-02-05 21:23:05 +00:00
vm_meter.c In a threaded world, differnt priorirites become properties of 2002-02-11 20:37:54 +00:00
vm_mmap.c Garbage-collect options ACPI_NO_ENABLE_ON_BOOT, AML_DEBUG, BLEED, 2002-02-15 13:16:11 +00:00
vm_object.c Move recently added procedure which was incorrectly placed within an 2001-10-26 16:27:54 +00:00
vm_object.h Implement kern.maxvnodes. adjusting kern.maxvnodes now actually has a 2001-10-26 00:08:05 +00:00
vm_page.c Add a page queue, PQ_HOLD, that temporarily owns pages with nonzero hold 2002-02-19 23:19:30 +00:00
vm_page.h Add a page queue, PQ_HOLD, that temporarily owns pages with nonzero hold 2002-02-19 23:19:30 +00:00
vm_pageout.c Fix a horribly suboptimal algorithm in the vm_daemon. 2002-02-27 18:03:02 +00:00
vm_pageout.h Changes to make the OOM killer much more effective: 2002-02-19 18:34:02 +00:00
vm_pageq.c Add a page queue, PQ_HOLD, that temporarily owns pages with nonzero hold 2002-02-19 23:19:30 +00:00
vm_pager.c Back out all the pmap related stuff I've touched over the last few days. 2002-02-27 09:51:33 +00:00
vm_pager.h
vm_param.h Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loader 2001-10-10 23:06:54 +00:00
vm_swap.c KSE Milestone 2 2001-09-12 08:38:13 +00:00
vm_unix.c Garbage-collect options ACPI_NO_ENABLE_ON_BOOT, AML_DEBUG, BLEED, 2002-02-15 13:16:11 +00:00
vm_zeroidle.c In a threaded world, differnt priorirites become properties of 2002-02-11 20:37:54 +00:00
vm_zone.c Back out all the pmap related stuff I've touched over the last few days. 2002-02-27 09:51:33 +00:00
vm_zone.h
vm.h Remove a parameter name from a prototype. 2002-01-25 21:33:10 +00:00
vnode_pager.c This fixes a large number of bugs in our NFS client side code. A recent 2001-12-14 01:16:57 +00:00
vnode_pager.h