freebsd-nq/sys/vm
Bosko Milekic d56368d779 Plug a race and a leak in UMA.
1) The race has to do with zone destruction.  From the zone destructor we
   would lock the zone, set the working set size to 0, then unlock the zone,
   drain it, and then free the structure.  Within the window following the
   working-set-size set to 0 and unlocking of the zone and the point where
   in zone_drain we re-acquire the zone lock, the uma timer routine could
   have fired off and changed the working set size to something non-zero,
   thereby potentially preventing us from completely freeing slabs before
   destroying the zone (and thus leaking them).

2) The leak has to do with zone destruction as well.  When destroying a
   zone we would take care to free all the buckets cached in the zone, but
   although we would drain the pcpu cache buckets, we would not free them.
   This resulted in leaking a couple of bucket structures (512 bytes each)
   per cpu on SMP during zone destruction.

While I'm here, also silence GCC warnings by turning uma_slab_alloc()
from inline to real function.  It's too big to be an inline.

Reviewed by: JeffR
2003-07-30 18:55:15 +00:00
..
default_pager.c Use __FBSDID(). 2003-06-11 23:50:51 +00:00
device_pager.c Assert that the vm object is locked on entry to dev_pager_getpages(). 2003-06-24 19:48:34 +00:00
phys_pager.c Use __FBSDID(). 2003-06-11 23:50:51 +00:00
pmap.h Background: pmap_object_init_pt() premaps the pages of a object in 2003-07-03 20:18:02 +00:00
swap_pager.c Add a "int fd" argument to VOP_OPEN() which in the future will 2003-07-26 07:32:23 +00:00
swap_pager.h Move the implementation of the vmspace_swap_count() (used only in 2003-07-18 10:47:58 +00:00
uma_core.c Plug a race and a leak in UMA. 2003-07-30 18:55:15 +00:00
uma_dbg.c Use __FBSDID(). 2003-06-11 23:50:51 +00:00
uma_dbg.h - Use my freebsd email alias in the copyright. 2002-09-19 06:05:32 +00:00
uma_int.h - Get rid of the ill-conceived uz_cachefree member of uma_zone. 2003-07-30 05:59:17 +00:00
uma.h Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
vm_contig.c Use pmap_zero_page() to zero pages instead of bzero() because 2003-07-27 10:41:33 +00:00
vm_extern.h Migrate the thread stack management functions from the machine-dependent 2003-06-14 23:23:55 +00:00
vm_fault.c Maintain a lock on the vm object of interest throughout vm_fault(), 2003-06-22 21:35:41 +00:00
vm_glue.c Use #ifdef __alpha__, not __alpha. 2003-06-15 00:12:42 +00:00
vm_init.c Avoid an unnecessary calculation: there is no need to subtract 2003-07-13 21:02:11 +00:00
vm_kern.c Remove GIANT_REQUIRED from kmem_alloc(). 2003-07-27 18:31:32 +00:00
vm_kern.h Move kernel_vm_end's declaration to pmap.h; add a comment regarding the 2003-02-15 19:38:23 +00:00
vm_map.c Move the implementation of the vmspace_swap_count() (used only in 2003-07-18 10:47:58 +00:00
vm_map.h Introduce vm_map_pmap_enter(). Presently, this is a stub calling the MD 2003-06-29 23:32:55 +00:00
vm_meter.c Use __FBSDID(). 2003-06-11 23:50:51 +00:00
vm_mmap.c Remove unnecessary cast. 2003-07-04 12:23:43 +00:00
vm_object.c Allow vm_object_reference() on kernel_object without Giant. 2003-07-27 05:43:58 +00:00
vm_object.h - Add VM_OBJECT_TRYLOCK(). 2003-06-04 19:59:23 +00:00
vm_page.c Modify vm_page_alloc() and vm_page_select_cache() to allow the page that 2003-07-01 07:33:41 +00:00
vm_page.h - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
vm_pageout.c - Complete the vm object locking in vm_pageout_object_deactivate_pages(). 2003-07-07 07:16:29 +00:00
vm_pageout.h Move a declaration to its proper place. 2003-05-03 04:21:16 +00:00
vm_pageq.c Modify vm_pageq_requeue() to handle a PQ_NONE page without dereferencing 2003-06-26 03:14:40 +00:00
vm_pager.c Initialize b_saveaddr when we hand out pbufs 2003-06-20 08:35:28 +00:00
vm_pager.h Assert that the vm object is locked on entry to vm_pager_get_pages(). 2003-06-23 06:15:05 +00:00
vm_param.h Rev 1.16 renamed VM_METER to VM_TOTAL. This is breaking 3rd-party apps. 2003-01-18 21:14:02 +00:00
vm_unix.c Use __FBSDID(). 2003-06-11 23:50:51 +00:00
vm_zeroidle.c Use __FBSDID(). 2003-06-11 23:50:51 +00:00
vm.h Change the way ELF coredumps are handled. Instead of unconditionally 2002-12-16 19:24:43 +00:00
vnode_pager.c Maintain a lock on the vm object of interest throughout vm_fault(), 2003-06-22 21:35:41 +00:00
vnode_pager.h Remove __P. 2002-03-19 22:20:14 +00:00