freebsd-skq/sys/vm
Alan Cox 0164e05781 Replace the linear search in vm_map_findspace() with an O(log n)
algorithm built into the map entry splay tree.  This replaces the
first_free hint in struct vm_map with two fields in vm_map_entry:
adj_free, the amount of free space following a map entry, and
max_free, the maximum amount of free space in the entry's subtree.
These fields make it possible to find a first-fit free region of a
given size in one pass down the tree, so O(log n) amortized using
splay trees.

This significantly reduces the overhead in vm_map_findspace() for
applications that mmap() many hundreds or thousands of regions, and
has a negligible slowdown (0.1%) on buildworld.  See, for example, the
discussion of a micro-benchmark titled "Some mmap observations
compared to Linux 2.6/OpenBSD" on -hackers in late October 2003.

OpenBSD adopted this approach in March 2002, and NetBSD added it in
November 2003, both with Red-Black trees.

Submitted by: Mark W. Krentel
2004-08-13 08:06:34 +00:00
..
default_pager.c Access the swap_pagers' ->putpages() through swappagerops instead 2003-08-06 12:05:48 +00:00
device_pager.c In dev_pager_updatefake, m->valid is typically 0 on entry. It 2004-08-04 08:58:58 +00:00
phys_pager.c Zero the physical page only if it is invalid and not prezeroed. 2004-04-25 07:58:59 +00:00
pmap.h - pmap_kenter_temporary() is unused by machine-independent code. Therefore, 2004-04-10 22:41:46 +00:00
swap_pager.c Tag all geom classes in the tree with a version number. 2004-08-08 07:57:53 +00:00
swap_pager.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
uma_core.c Generate KTR trace records for uma_zalloc_arg() and uma_zfree_arg(). 2004-08-06 21:52:38 +00:00
uma_dbg.c * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
uma_dbg.h * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
uma_int.h Rework the way slab header storage space is calculated in UMA. 2004-07-29 15:25:40 +00:00
uma.h * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
vm_contig.c Turn on the new contigmalloc(9) by default. There should not actually 2004-08-05 21:54:11 +00:00
vm_extern.h For years, kmem_alloc_pageable() has been misused. Now that the last of 2004-07-25 20:08:59 +00:00
vm_fault.c The vm map lock is needed in vm_fault() after the page has been found, 2004-08-12 20:14:49 +00:00
vm_glue.c Giant is no longer required by vm_waitproc() and vmspace_exitfree(). 2004-07-30 20:31:02 +00:00
vm_init.c Remove dead code. A vm_map's first_free is never NULL (even if the map is 2004-08-07 05:58:31 +00:00
vm_kern.c Back out all behavioral chnages. 2004-08-10 14:42:48 +00:00
vm_kern.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vm_map.c Replace the linear search in vm_map_findspace() with an O(log n) 2004-08-13 08:06:34 +00:00
vm_map.h Replace the linear search in vm_map_findspace() with an O(log n) 2004-08-13 08:06:34 +00:00
vm_meter.c Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vm_mmap.c Remove a product specific workaround for wrong modes when mmap(2)'ing 2004-08-05 07:04:33 +00:00
vm_object.c * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
vm_object.h Make the code and comments for vm_object_coalesce() consistent. 2004-07-25 07:48:47 +00:00
vm_page.c Advance the state of pmap locking on alpha, amd64, and i386. 2004-07-29 18:56:31 +00:00
vm_page.h Reimplement contigmalloc(9) with an algorithm which stands a greatly- 2004-07-19 06:21:27 +00:00
vm_pageout.c Remove the GIANT_REQUIRED preceding pmap_remove() in 2004-07-18 04:38:11 +00:00
vm_pageout.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vm_pageq.c Remove references to L1 in the comments, according to Alan they are 2004-06-07 19:33:05 +00:00
vm_pager.c The demise of vm_pager_map_page() in revision 1.93 of vm/vm_pager.c permits 2004-04-08 19:08:49 +00:00
vm_pager.h The demise of vm_pager_map_page() in revision 1.93 of vm/vm_pager.c permits 2004-04-08 19:08:49 +00:00
vm_param.h Second half of the dev_t cleanup. 2004-06-17 17:16:53 +00:00
vm_unix.c Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vm_zeroidle.c Implement preemption of kernel threads natively in the scheduler rather 2004-07-02 20:21:44 +00:00
vm.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vnode_pager.c Make vm_page's PG_ZERO flag immutable between the time of the page's 2004-05-06 05:03:23 +00:00
vnode_pager.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00