freebsd-nq/sys/vm
Robert Watson 7a52a97eb3 Introduce a new sysctl, vm.zone_stats, which exports UMA(9) allocator
statistics via a binary structure stream:

- Add structure 'uma_stream_header', which defines a stream version,
  definition of MAXCPUs used in the stream, and the number of zone
  records in the stream.

- Add structure 'uma_type_header', which defines the name, alignment,
  size, resource allocation limits, current pages allocated, preferred
  bucket size, and central zone + keg statistics.

- Add structure 'uma_percpu_stat', which, for each per-CPU cache,
  includes the number of allocations and frees, as well as the number
  of free items in the cache.

- When the sysctl is queried, return a stream header, followed by a
  series of type descriptions, each consisting of a type header
  followed by a series of MAXCPUs uma_percpu_stat structures holding
  per-CPU allocation information.  Typical values of MAXCPU will be
  1 (UP compiled kernel) and 16 (SMP compiled kernel).

This query mechanism allows user space monitoring tools to extract
memory allocation statistics in a machine-readable form, and to do so
at a per-CPU granularity, allowing monitoring of allocation patterns
across CPUs in order to better understand the distribution of work and
memory flow over multiple CPUs.

While here, also export the number of UMA zones as a sysctl
vm.uma_count, in order to assist in sizing user swpace buffers to
receive the stream.

A follow-up commit of libmemstat(3), a library to monitor kernel memory
allocation, will occur in the next few days.  This change directly
supports converting netstat(1)'s "-mb" mode to using UMA-sourced stats
rather than separately maintained mbuf allocator statistics.

MFC after:	1 week
2005-07-14 16:35:13 +00:00
..
default_pager.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
device_pager.c Add a comment to the effect that fictitious pages do not require the 2005-06-10 17:27:54 +00:00
memguard.c Well, it seems that I pre-maturely removed the "All rights reserved" 2005-02-16 21:45:59 +00:00
memguard.h Well, it seems that I pre-maturely removed the "All rights reserved" 2005-02-16 21:45:59 +00:00
phys_pager.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
pmap.h Introduce a procedure, pmap_page_init(), that initializes the 2005-06-10 03:33:36 +00:00
swap_pager.c Reduce the number of times that we acquire and release locks in 2005-05-20 21:26:05 +00:00
swap_pager.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
uma_core.c Introduce a new sysctl, vm.zone_stats, which exports UMA(9) allocator 2005-07-14 16:35:13 +00:00
uma_dbg.c Change the panic in trash_ctor into just a printf for now. Once the reports 2005-06-26 23:44:07 +00:00
uma_dbg.h Well, it seems that I pre-maturely removed the "All rights reserved" 2005-02-16 21:45:59 +00:00
uma_int.h Introduce a new sysctl, vm.zone_stats, which exports UMA(9) allocator 2005-07-14 16:35:13 +00:00
uma.h Introduce a new sysctl, vm.zone_stats, which exports UMA(9) allocator 2005-07-14 16:35:13 +00:00
vm_contig.c The new contigmalloc(9) has a bad degenerate case where there were 2005-06-11 00:05:16 +00:00
vm_extern.h - Change the vm_mmap() function to accept an objtype_t parameter specifying 2005-04-01 20:00:11 +00:00
vm_fault.c The final test in unlock_and_deallocate() to determine if GIANT needs to be 2005-05-12 04:09:41 +00:00
vm_glue.c Use low level constructs borrowed from interrupt threads to wait for 2005-05-23 23:01:53 +00:00
vm_init.c Add the vm.exec_map_entries tunable and read-only sysctl, which controls 2005-04-25 19:22:05 +00:00
vm_kern.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_kern.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_map.c Remove GIANT_REQUIRED from vmspace_exec(). 2005-05-02 07:05:20 +00:00
vm_map.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_meter.c Enable debug_mpsafevm on ia64 due to the severe functional regression 2005-05-08 23:56:16 +00:00
vm_mmap.c Move MAC check_vnode_mmap entry point out from being exclusive to 2005-04-14 16:03:30 +00:00
vm_object.c - We need to inhert the OBJ_NEEDGIANT flag from the original object in 2005-05-04 20:54:16 +00:00
vm_object.h - Add a new object flag "OBJ_NEEDSGIANT". We set this flag if the 2005-05-03 11:11:26 +00:00
vm_page.c - In vm_page_insert() hold the backing vnode when the first page 2005-03-15 14:14:09 +00:00
vm_page.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_pageout.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_pageout.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_pageq.c Introduce a procedure, pmap_page_init(), that initializes the 2005-06-10 03:33:36 +00:00
vm_pager.c Remove calls to spl*(). 2005-05-18 20:45:33 +00:00
vm_pager.h Update some comments to reflect the change from spl-based to lock-based 2005-05-18 22:08:52 +00:00
vm_param.h /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_unix.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
vm_zeroidle.c Set the scheduling class of the zeroidle thread to PRI_IDLE. 2005-02-04 06:18:31 +00:00
vm.h - Change the vm_mmap() function to accept an objtype_t parameter specifying 2005-04-01 20:00:11 +00:00
vnode_pager.c Remove a stale comment concerning spl* usage. 2005-05-19 03:53:07 +00:00
vnode_pager.h Move the body of vop_stdcreatevobject() over to the vnode_pager under 2005-01-24 21:21:59 +00:00