FreeBSD virtual memory subsystem code
vm_pageout.c File Reference
#include <sys/cdefs.h>
#include "opt_vm.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/eventhandler.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/kthread.h>
#include <sys/ktr.h>
#include <sys/mount.h>
#include <sys/racct.h>
#include <sys/resourcevar.h>
#include <sys/sched.h>
#include <sys/sdt.h>
#include <sys/signalvar.h>
#include <sys/smp.h>
#include <sys/time.h>
#include <sys/vnode.h>
#include <sys/vmmeter.h>
#include <sys/rwlock.h>
#include <sys/sx.h>
#include <sys/sysctl.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <vm/vm_pageout.h>
#include <vm/vm_pager.h>
#include <vm/vm_phys.h>
#include <vm/vm_pagequeue.h>
#include <vm/swap_pager.h>
#include <vm/vm_extern.h>
#include <vm/uma.h>
Include dependency graph for vm_pageout.c:

Go to the source code of this file.

Data Structures

struct  scan_state
 

Macros

#define VM_LAUNDER_RATE   10
 
#define VM_INACT_SCAN_RATE   10
 

Functions

 __FBSDID ("$FreeBSD: head/sys/vm/vm_pageout.c 353539 2019-10-15 03:45:41Z jeff $")
 
static void vm_pageout (void)
 
static void vm_pageout_init (void)
 
static int vm_pageout_clean (vm_page_t m, int *numpagedout)
 
static int vm_pageout_cluster (vm_page_t m)
 
static void vm_pageout_mightbe_oom (struct vm_domain *vmd, int page_shortage, int starting_page_shortage)
 
 SYSINIT (pagedaemon_init, SI_SUB_KTHREAD_PAGE, SI_ORDER_FIRST, vm_pageout_init, NULL)
 
 SYSINIT (pagedaemon, SI_SUB_KTHREAD_PAGE, SI_ORDER_SECOND, kproc_start, &page_kp)
 
 SDT_PROVIDER_DEFINE (vm)
 
 SDT_PROBE_DEFINE (vm,,, vm__lowmem_scan)
 
 SYSCTL_INT (_vm, OID_AUTO, panic_on_oom, CTLFLAG_RWTUN, &vm_panic_on_oom, 0, "panic on out of memory instead of killing the largest process")
 
 SYSCTL_INT (_vm, OID_AUTO, pageout_update_period, CTLFLAG_RWTUN, &vm_pageout_update_period, 0, "Maximum active LRU update period")
 
 SYSCTL_INT (_vm, OID_AUTO, lowmem_period, CTLFLAG_RWTUN, &lowmem_period, 0, "Low memory callback period")
 
 SYSCTL_INT (_vm, OID_AUTO, disable_swapspace_pageouts, CTLFLAG_RWTUN, &disable_swap_pageouts, 0, "Disallow swapout of dirty pages")
 
 SYSCTL_INT (_vm, OID_AUTO, pageout_lock_miss, CTLFLAG_RD, &pageout_lock_miss, 0, "vget() lock misses during pageout")
 
 SYSCTL_INT (_vm, OID_AUTO, pageout_oom_seq, CTLFLAG_RWTUN, &vm_pageout_oom_seq, 0, "back-to-back calls to oom detector to start OOM")
 
 SYSCTL_INT (_vm, OID_AUTO, act_scan_laundry_weight, CTLFLAG_RWTUN, &act_scan_laundry_weight, 0, "weight given to clean vs. dirty pages in active queue scans")
 
 SYSCTL_UINT (_vm, OID_AUTO, background_launder_rate, CTLFLAG_RWTUN, &vm_background_launder_rate, 0, "background laundering rate, in kilobytes per second")
 
 SYSCTL_UINT (_vm, OID_AUTO, background_launder_max, CTLFLAG_RWTUN, &vm_background_launder_max, 0, "background laundering cap, in kilobytes")
 
 SYSCTL_ULONG (_vm, OID_AUTO, max_user_wired, CTLFLAG_RW, &vm_page_max_user_wired, 0, "system-wide limit to user-wired page count")
 
static u_int isqrt (u_int num)
 
static int vm_pageout_launder (struct vm_domain *vmd, int launder, bool in_shortfall)
 
static void vm_pageout_laundry_worker (void *arg)
 
static void vm_pageout_init_scan (struct scan_state *ss, struct vm_pagequeue *pq, vm_page_t marker, vm_page_t after, int maxscan)
 
static void vm_pageout_end_scan (struct scan_state *ss)
 
static __always_inline void vm_pageout_collect_batch (struct scan_state *ss, const bool dequeue)
 
static __always_inline vm_page_t vm_pageout_next (struct scan_state *ss, const bool dequeue)
 
int vm_pageout_flush (vm_page_t *mc, int count, int flags, int mreq, int *prunlen, boolean_t *eio)
 
static void vm_pageout_swapon (void *arg __unused, struct swdevt *sp __unused)
 
static void vm_pageout_swapoff (void *arg __unused, struct swdevt *sp __unused)
 
static int vm_pageout_active_target (struct vm_domain *vmd)
 
static void vm_pageout_scan_active (struct vm_domain *vmd, int page_shortage)
 
static int vm_pageout_reinsert_inactive_page (struct scan_state *ss, vm_page_t m)
 
static void vm_pageout_reinsert_inactive (struct scan_state *ss, struct vm_batchqueue *bq, vm_page_t m)
 
static int vm_pageout_scan_inactive (struct vm_domain *vmd, int shortage, int *addl_shortage)
 
static long vm_pageout_oom_pagecount (struct vmspace *vmspace)
 
 SYSCTL_INT (_vm, OID_AUTO, oom_pf_secs, CTLFLAG_RWTUN, &vm_oom_pf_secs, 0, "")
 
void vm_pageout_oom (int shortage)
 
static bool vm_pageout_lowmem (void)
 
static void vm_pageout_worker (void *arg)
 
static void vm_pageout_init_domain (int domain)
 
void pagedaemon_wakeup (int domain)
 

Variables

struct proc * pageproc
 
static struct kproc_desc page_kp
 
static int vm_pageout_oom_seq = 12
 
static int vm_pageout_update_period
 
static int disable_swap_pageouts
 
static int lowmem_period = 10
 
static int swapdev_enabled
 
static int vm_panic_on_oom = 0
 
static int pageout_lock_miss
 
static int act_scan_laundry_weight = 3
 
static u_int vm_background_launder_rate = 4096
 
static u_int vm_background_launder_max = 20 * 1024
 
int vm_pageout_page_count = 32
 
u_long vm_page_max_user_wired
 
static int vm_pageout_oom_vote
 
static int vm_oom_ratelim_last
 
static int vm_oom_pf_secs = 10
 
static struct mtx vm_oom_ratelim_mtx
 

Macro Definition Documentation

◆ VM_INACT_SCAN_RATE

#define VM_INACT_SCAN_RATE   10

Definition at line 148 of file vm_pageout.c.

◆ VM_LAUNDER_RATE

#define VM_LAUNDER_RATE   10

Definition at line 147 of file vm_pageout.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD: head/sys/vm/vm_pageout.c 353539 2019-10-15 03:45:41Z jeff $"  )

◆ isqrt()

static u_int isqrt ( u_int  num)
static

Definition at line 985 of file vm_pageout.c.

Referenced by vm_pageout_laundry_worker().

Here is the caller graph for this function:

◆ pagedaemon_wakeup()

void pagedaemon_wakeup ( int  domain)

Definition at line 2230 of file vm_pageout.c.

References pageproc, VM_DOMAIN, vm_domain_pageout_assert_unlocked, vm_domain_pageout_lock, vm_domain_pageout_unlock, and vm_domain::vmd_pageout_wanted.

Referenced by vm_domain_allocate().

Here is the caller graph for this function:

◆ SDT_PROBE_DEFINE()

SDT_PROBE_DEFINE ( vm  ,
vm__lowmem_scan   
)

◆ SDT_PROVIDER_DEFINE()

SDT_PROVIDER_DEFINE ( vm  )

◆ SYSCTL_INT() [1/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
panic_on_oom  ,
CTLFLAG_RWTUN  ,
vm_panic_on_oom,
,
"panic on out of memory instead of killing the largest process"   
)

◆ SYSCTL_INT() [2/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
pageout_update_period  ,
CTLFLAG_RWTUN  ,
vm_pageout_update_period,
,
"Maximum active LRU update period"   
)

◆ SYSCTL_INT() [3/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
lowmem_period  ,
CTLFLAG_RWTUN  ,
lowmem_period,
,
"Low memory callback period"   
)

◆ SYSCTL_INT() [4/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
disable_swapspace_pageouts  ,
CTLFLAG_RWTUN  ,
disable_swap_pageouts,
,
"Disallow swapout of dirty pages"   
)

◆ SYSCTL_INT() [5/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
pageout_lock_miss  ,
CTLFLAG_RD  ,
pageout_lock_miss,
,
"vget() lock misses during pageout"   
)

◆ SYSCTL_INT() [6/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
pageout_oom_seq  ,
CTLFLAG_RWTUN  ,
vm_pageout_oom_seq,
,
"back-to-back calls to oom detector to start OOM"   
)

◆ SYSCTL_INT() [7/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
act_scan_laundry_weight  ,
CTLFLAG_RWTUN  ,
act_scan_laundry_weight,
,
"weight given to clean vs. dirty pages in active queue scans"   
)

◆ SYSCTL_INT() [8/8]

SYSCTL_INT ( _vm  ,
OID_AUTO  ,
oom_pf_secs  ,
CTLFLAG_RWTUN  ,
vm_oom_pf_secs,
,
""   
)

◆ SYSCTL_UINT() [1/2]

SYSCTL_UINT ( _vm  ,
OID_AUTO  ,
background_launder_rate  ,
CTLFLAG_RWTUN  ,
vm_background_launder_rate,
,
"background laundering  rate,
in kilobytes per second"   
)

◆ SYSCTL_UINT() [2/2]

SYSCTL_UINT ( _vm  ,
OID_AUTO  ,
background_launder_max  ,
CTLFLAG_RWTUN  ,
vm_background_launder_max,
,
"background laundering  cap,
in kilobytes"   
)

◆ SYSCTL_ULONG()

SYSCTL_ULONG ( _vm  ,
OID_AUTO  ,
max_user_wired  ,
CTLFLAG_RW  ,
vm_page_max_user_wired,
,
"system-wide limit to user-wired page count"   
)

◆ SYSINIT() [1/2]

SYSINIT ( pagedaemon_init  ,
SI_SUB_KTHREAD_PAGE  ,
SI_ORDER_FIRST  ,
vm_pageout_init  ,
NULL   
)

◆ SYSINIT() [2/2]

SYSINIT ( pagedaemon  ,
SI_SUB_KTHREAD_PAGE  ,
SI_ORDER_SECOND  ,
kproc_start  ,
page_kp 
)

◆ vm_pageout()

static void vm_pageout ( void  )
static

Definition at line 2186 of file vm_pageout.c.

References swap_pager_swap_init(), uma_reclaim_worker(), VM_DOMAIN_EMPTY, vm_ndomains, vm_oom_ratelim_mtx, vm_pageout_laundry_worker(), and vm_pageout_worker().

Here is the call graph for this function:

◆ vm_pageout_active_target()

static int vm_pageout_active_target ( struct vm_domain vmd)
static

Definition at line 1175 of file vm_pageout.c.

References act_scan_laundry_weight, vm_pagequeue::pq_cnt, PQ_INACTIVE, PQ_LAUNDRY, vm_paging_target(), vm_domain::vmd_inactive_target, and vm_domain::vmd_pagequeues.

Referenced by vm_pageout_worker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_clean()

static int vm_pageout_clean ( vm_page_t  m,
int *  numpagedout 
)
static

Definition at line 586 of file vm_pageout.c.

References OBJT_VNODE, vm_object::type, VM_OBJECT_ASSERT_WLOCKED, vm_object_deallocate(), vm_object_reference_locked(), VM_OBJECT_WLOCK, VM_OBJECT_WUNLOCK, vm_page_assert_locked, vm_page_in_laundry(), vm_page_lock, vm_page_lock_assert, vm_page_try_remove_write(), vm_page_tryxbusy(), vm_page_unlock, vm_page_xunbusy, and vm_pageout_cluster().

Referenced by vm_pageout_launder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_cluster()

static int vm_pageout_cluster ( vm_page_t  m)
static

Definition at line 326 of file vm_pageout.c.

References VM_OBJECT_ASSERT_WLOCKED, vm_page_assert_xbusied, vm_page_in_laundry(), vm_page_lock, vm_page_next(), vm_page_prev(), vm_page_test_dirty(), vm_page_try_remove_write(), vm_page_tryxbusy(), vm_page_unlock, vm_page_wired(), vm_page_xunbusy, vm_pageout_flush(), vm_pageout_page_count, and VM_PAGER_PUT_NOREUSE.

Referenced by vm_pageout_clean().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_collect_batch()

static __always_inline void vm_pageout_collect_batch ( struct scan_state ss,
const bool  dequeue 
)
static

Definition at line 266 of file vm_pageout.c.

References scan_state::bq, vm_batchqueue::bq_cnt, scan_state::marker, scan_state::maxscan, PG_FICTITIOUS, PG_MARKER, PGA_ENQUEUED, scan_state::pq, vm_pagequeue::pq_pl, scan_state::scanned, vm_batchqueue_insert(), VM_BATCHQUEUE_SIZE, vm_page_aflag_clear(), vm_pagequeue_cnt_add(), vm_pagequeue_lock, vm_pagequeue_unlock, and VPO_UNMANAGED.

Referenced by vm_pageout_next().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_end_scan()

static void vm_pageout_end_scan ( struct scan_state ss)
static

Definition at line 239 of file vm_pageout.c.

References scan_state::marker, PGA_ENQUEUED, scan_state::pq, vm_pagequeue::pq_pdpages, vm_pagequeue::pq_pl, scan_state::scanned, vm_page_aflag_clear(), and vm_pagequeue_assert_locked.

Referenced by vm_pageout_launder(), vm_pageout_scan_active(), and vm_pageout_scan_inactive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_flush()

int vm_pageout_flush ( vm_page_t *  mc,
int  count,
int  flags,
int  mreq,
int *  prunlen,
boolean_t *  eio 
)

Definition at line 451 of file vm_pageout.c.

References OBJT_SWAP, PGA_WRITEABLE, vm_object::type, VM_OBJECT_ASSERT_WLOCKED, vm_object_pip_add(), vm_object_pip_wakeup(), vm_page_activate(), vm_page_all_valid(), vm_page_busy_downgrade(), vm_page_deactivate_noreuse(), vm_page_in_laundry(), vm_page_lock, vm_page_sunbusy(), vm_page_undirty(), vm_page_unlock, vm_page_unswappable(), VM_PAGER_AGAIN, VM_PAGER_BAD, VM_PAGER_ERROR, VM_PAGER_FAIL, VM_PAGER_OK, VM_PAGER_PEND, and vm_pager_put_pages().

Referenced by vm_object_page_collect_flush(), and vm_pageout_cluster().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_init()

static void vm_pageout_init ( void  )
static

◆ vm_pageout_init_domain()

static void vm_pageout_init_domain ( int  domain)
static

◆ vm_pageout_init_scan()

static void vm_pageout_init_scan ( struct scan_state ss,
struct vm_pagequeue pq,
vm_page_t  marker,
vm_page_t  after,
int  maxscan 
)
static

Definition at line 216 of file vm_pageout.c.

References scan_state::bq, scan_state::marker, scan_state::maxscan, PGA_ENQUEUED, scan_state::pq, vm_pagequeue::pq_pl, scan_state::scanned, vm_batchqueue_init(), vm_page_aflag_set(), vm_pagequeue_assert_locked, and vm_pagequeue_unlock.

Referenced by vm_pageout_launder(), vm_pageout_scan_active(), and vm_pageout_scan_inactive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_launder()

◆ vm_pageout_laundry_worker()

static void vm_pageout_laundry_worker ( void *  arg)
static

Definition at line 1009 of file vm_pageout.c.

References isqrt(), vm_pagequeue::pq_cnt, PQ_INACTIVE, PQ_LAUNDRY, vm_background_launder_max, vm_background_launder_rate, VM_DOMAIN, VM_INACT_SCAN_RATE, VM_LAUNDER_RATE, VM_LAUNDRY_IDLE, VM_LAUNDRY_SHORTFALL, vm_laundry_target(), vm_pageout_launder(), vm_pageout_swapoff(), vm_pageout_swapon(), vm_pagequeue_lock, vm_pagequeue_lockptr, vm_pagequeue_unlock, vm_domain::vmd_background_launder_target, vm_domain::vmd_clean_pages_freed, vm_domain::vmd_free_min, vm_domain::vmd_free_target, vm_domain::vmd_laundry_request, vm_domain::vmd_pageout_deficit, vm_domain::vmd_pagequeues, and vm_domain::vmd_segs.

Referenced by vm_pageout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_lowmem()

static bool vm_pageout_lowmem ( void  )
static

Definition at line 1969 of file vm_pageout.c.

References lowmem_period, uma_reclaim(), UMA_RECLAIM_DRAIN_CPU, UMA_RECLAIM_TRIM, and VM_LOW_PAGES.

Referenced by vm_pageout_worker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_mightbe_oom()

static void vm_pageout_mightbe_oom ( struct vm_domain vmd,
int  page_shortage,
int  starting_page_shortage 
)
static

Definition at line 1729 of file vm_pageout.c.

References vm_ndomains, VM_OOM_MEM, vm_pageout_oom(), vm_pageout_oom_seq, vm_pageout_oom_vote, vm_domain::vmd_oom, and vm_domain::vmd_oom_seq.

Referenced by vm_pageout_scan_inactive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_next()

static __always_inline vm_page_t vm_pageout_next ( struct scan_state ss,
const bool  dequeue 
)
static

Definition at line 312 of file vm_pageout.c.

References scan_state::bq, vm_batchqueue::bq_cnt, vm_batchqueue_pop(), and vm_pageout_collect_batch().

Referenced by vm_pageout_launder(), vm_pageout_scan_active(), and vm_pageout_scan_inactive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_oom()

void vm_pageout_oom ( int  shortage)

Definition at line 1843 of file vm_pageout.c.

References swap_pager_avail, vmspace::vm_map, vm_map_trylock_read, vm_map_unlock_read, VM_OOM_MEM, VM_OOM_MEM_PF, vm_oom_pf_secs, vm_oom_ratelim_last, vm_oom_ratelim_mtx, vm_pageout_oom_pagecount(), vm_panic_on_oom, vmspace_acquire_ref(), vmspace_free(), and vmspace_swap_count().

Referenced by swp_pager_meta_build(), vm_fault(), and vm_pageout_mightbe_oom().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_oom_pagecount()

static long vm_pageout_oom_pagecount ( struct vmspace vmspace)
static

Definition at line 1804 of file vm_pageout.c.

References vm_map_entry::eflags, vm_map::lock, MAP_ENTRY_IS_SUB_MAP, MAP_ENTRY_NEEDS_COPY, vm_map_entry::object, OBJT_DEFAULT, OBJT_PHYS, OBJT_SWAP, OBJT_VNODE, vm_object::ref_count, vm_object::resident_page_count, vm_map::system_map, vm_object::type, vmspace::vm_map, VM_MAP_ENTRY_FOREACH, and vm_map_object::vm_object.

Referenced by vm_pageout_oom().

Here is the caller graph for this function:

◆ vm_pageout_reinsert_inactive()

static void vm_pageout_reinsert_inactive ( struct scan_state ss,
struct vm_batchqueue bq,
vm_page_t  m 
)
static

Definition at line 1397 of file vm_pageout.c.

References scan_state::pq, vm_batchqueue_init(), vm_batchqueue_insert(), vm_batchqueue_pop(), vm_pageout_reinsert_inactive_page(), vm_pagequeue_cnt_add(), vm_pagequeue_lock, and vm_pagequeue_unlock.

Referenced by vm_pageout_scan_inactive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_reinsert_inactive_page()

static int vm_pageout_reinsert_inactive_page ( struct scan_state ss,
vm_page_t  m 
)
static

Definition at line 1371 of file vm_pageout.c.

References scan_state::marker, PGA_ENQUEUED, PGA_REQUEUE, PGA_REQUEUE_HEAD, scan_state::pq, PQ_INACTIVE, vm_pagequeue::pq_pl, vm_page_aflag_clear(), vm_page_aflag_set(), vm_pagequeue_domain(), and vm_domain::vmd_inacthead.

Referenced by vm_pageout_reinsert_inactive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_scan_active()

static void vm_pageout_scan_active ( struct vm_domain vmd,
int  page_shortage 
)
static

Definition at line 1191 of file vm_pageout.c.

References ACT_ADVANCE, ACT_DECLINE, ACT_MAX, act_scan_laundry_weight, PG_MARKER, PGA_REFERENCED, pmap_ts_referenced(), PQ_ACTIVE, vm_pagequeue::pq_cnt, PQ_INACTIVE, PQ_LAUNDRY, vm_pagequeue::pq_pl, vm_object::ref_count, scan_state::scanned, vm_page_aflag_clear(), vm_page_change_lock(), vm_page_dequeue_deferred(), vm_page_queue(), vm_page_swapqueue(), vm_page_wired(), vm_pageout_end_scan(), vm_pageout_init_scan(), vm_pageout_next(), vm_pageout_update_period, vm_pagequeue_lock, vm_pagequeue_unlock, vm_domain::vmd_clock, vm_domain::vmd_last_active_scan, vm_domain::vmd_markers, and vm_domain::vmd_pagequeues.

Referenced by vm_pageout_worker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_scan_inactive()

static int vm_pageout_scan_inactive ( struct vm_domain vmd,
int  shortage,
int *  addl_shortage 
)
static

◆ vm_pageout_swapoff()

static void vm_pageout_swapoff ( void *arg  __unused,
struct swdevt *sp  __unused 
)
static

Definition at line 570 of file vm_pageout.c.

References swap_pager_nswapdev(), and swapdev_enabled.

Referenced by vm_pageout_laundry_worker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vm_pageout_swapon()

static void vm_pageout_swapon ( void *arg  __unused,
struct swdevt *sp  __unused 
)
static

Definition at line 563 of file vm_pageout.c.

References swapdev_enabled.

Referenced by vm_pageout_laundry_worker().

Here is the caller graph for this function:

◆ vm_pageout_worker()

static void vm_pageout_worker ( void *  arg)
static

Definition at line 1999 of file vm_pageout.c.

References VM_DOMAIN, vm_domain_pageout_lock, vm_domain_pageout_lockptr, vm_domain_pageout_unlock, VM_INACT_SCAN_RATE, vm_pageout_active_target(), vm_pageout_lowmem(), vm_pageout_scan_active(), vm_pageout_scan_inactive(), vm_paging_needed(), vm_domain::vmd_last_active_scan, vm_domain::vmd_pageout_wanted, vm_domain::vmd_pid, and vm_domain::vmd_segs.

Referenced by vm_pageout().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ act_scan_laundry_weight

int act_scan_laundry_weight = 3
static

Definition at line 181 of file vm_pageout.c.

Referenced by vm_pageout_active_target(), and vm_pageout_scan_active().

◆ disable_swap_pageouts

int disable_swap_pageouts
static

Definition at line 153 of file vm_pageout.c.

Referenced by vm_pageout_launder().

◆ lowmem_period

int lowmem_period = 10
static

Definition at line 154 of file vm_pageout.c.

Referenced by vm_pageout_lowmem().

◆ page_kp

struct kproc_desc page_kp
static
Initial value:
= {
"pagedaemon",
}
static void vm_pageout(void)
Definition: vm_pageout.c:2186
struct proc * pageproc
Definition: vm_pageout.c:133

Definition at line 135 of file vm_pageout.c.

◆ pageout_lock_miss

int pageout_lock_miss
static

Definition at line 173 of file vm_pageout.c.

Referenced by vm_pageout_launder().

◆ pageproc

◆ swapdev_enabled

int swapdev_enabled
static

◆ vm_background_launder_max

u_int vm_background_launder_max = 20 * 1024
static

Definition at line 191 of file vm_pageout.c.

Referenced by vm_pageout_laundry_worker().

◆ vm_background_launder_rate

u_int vm_background_launder_rate = 4096
static

Definition at line 186 of file vm_pageout.c.

Referenced by vm_pageout_laundry_worker().

◆ vm_oom_pf_secs

int vm_oom_pf_secs = 10
static

Definition at line 1837 of file vm_pageout.c.

Referenced by vm_pageout_oom().

◆ vm_oom_ratelim_last

int vm_oom_ratelim_last
static

Definition at line 1836 of file vm_pageout.c.

Referenced by vm_pageout_oom().

◆ vm_oom_ratelim_mtx

struct mtx vm_oom_ratelim_mtx
static

Definition at line 1840 of file vm_pageout.c.

Referenced by vm_pageout(), and vm_pageout_oom().

◆ vm_page_max_user_wired

u_long vm_page_max_user_wired

Definition at line 197 of file vm_pageout.c.

Referenced by kern_mlock(), vm_map_wire_user_count_add(), vm_pageout_init(), and vslock().

◆ vm_pageout_oom_seq

int vm_pageout_oom_seq = 12
static

Definition at line 150 of file vm_pageout.c.

Referenced by vm_pageout_mightbe_oom().

◆ vm_pageout_oom_vote

int vm_pageout_oom_vote
static

Definition at line 1721 of file vm_pageout.c.

Referenced by vm_pageout_mightbe_oom().

◆ vm_pageout_page_count

int vm_pageout_page_count = 32

◆ vm_pageout_update_period

int vm_pageout_update_period
static

Definition at line 152 of file vm_pageout.c.

Referenced by vm_pageout_init(), and vm_pageout_scan_active().

◆ vm_panic_on_oom

int vm_panic_on_oom = 0
static

Definition at line 157 of file vm_pageout.c.

Referenced by vm_pageout_oom().