freebsd-dev/sys/vm
Mark Johnston 08cfa56ea3 Extend uma_reclaim() to permit different reclamation targets.
The page daemon periodically invokes uma_reclaim() to reclaim cached
items from each zone when the system is under memory pressure.  This
is important since the size of these caches is unbounded by default.
However it also results in bursts of high latency when allocating from
heavily used zones as threads miss in the per-CPU caches and must
access the keg in order to allocate new items.

With r340405 we maintain an estimate of each zone's usage of its
(per-NUMA domain) cache of full buckets.  Start making use of this
estimate to avoid reclaiming the entire cache when under memory
pressure.  In particular, introduce TRIM, DRAIN and DRAIN_CPU
verbs for uma_reclaim() and uma_zone_reclaim().  When trimming, only
items in excess of the estimate are reclaimed.  Draining a zone
reclaims all of the cached full buckets (the previous behaviour of
uma_reclaim()), and may further drain the per-CPU caches in extreme
cases.

Now, when under memory pressure, the page daemon will trim zones
rather than draining them.  As a result, heavily used zones do not incur
bursts of bucket cache misses following reclamation, but large, unused
caches will be reclaimed as before.

Reviewed by:	jeff
Tested by:	pho (an earlier version)
MFC after:	2 months
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D16667
2019-09-01 22:22:43 +00:00
..
_vm_radix.h
default_pager.c
device_pager.c
memguard.c
memguard.h
phys_pager.c
pmap.h
redzone.c
redzone.h
sg_pager.c
swap_pager.c
swap_pager.h
uma_core.c Extend uma_reclaim() to permit different reclamation targets. 2019-09-01 22:22:43 +00:00
uma_dbg.c
uma_dbg.h
uma_int.h Extend uma_reclaim() to permit different reclamation targets. 2019-09-01 22:22:43 +00:00
uma.h Extend uma_reclaim() to permit different reclamation targets. 2019-09-01 22:22:43 +00:00
vm_domainset.c
vm_domainset.h
vm_extern.h
vm_fault.c
vm_glue.c Wire pages in vm_page_grab() when appropriate. 2019-08-28 16:08:06 +00:00
vm_init.c
vm_kern.c
vm_kern.h
vm_map.c vm_map_simplify_entry considers merging an entry with its two 2019-08-25 07:06:51 +00:00
vm_map.h vm_map_simplify_entry considers merging an entry with its two 2019-08-25 07:06:51 +00:00
vm_meter.c
vm_mmap.c
vm_object.c vm: only lock tmpfs vnode shared in vm_object_deallocate 2019-08-28 19:28:27 +00:00
vm_object.h Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
vm_page.c Fix a few nits in vm_pqbatch_process_page(). 2019-08-26 20:20:10 +00:00
vm_page.h Make vm_pqbatch_submit_page() externally visible. 2019-08-23 19:49:29 +00:00
vm_pageout.c Extend uma_reclaim() to permit different reclamation targets. 2019-09-01 22:22:43 +00:00
vm_pageout.h
vm_pagequeue.h Simplify vm_page_dequeue() and fix an assertion. 2019-08-21 16:11:12 +00:00
vm_pager.c
vm_pager.h
vm_param.h
vm_phys.c
vm_phys.h
vm_radix.c
vm_radix.h
vm_reserv.c
vm_reserv.h
vm_swapout_dummy.c
vm_swapout.c Make vm_pqbatch_submit_page() externally visible. 2019-08-23 19:49:29 +00:00
vm_unix.c
vm.h
vnode_pager.c Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
vnode_pager.h