Print this page
remove whole-process swapping
Long before Unix supported paging, it used process swapping to reclaim
memory.  The code is there and in theory it runs when we get *extremely* low
on memory.  In practice, it never runs since the definition of low-on-memory
is antiquated. (XXX: define what antiquated means)
You can check the number of swapout/swapin events with kstats:
$ kstat -p ::vm:swapin ::vm:swapout

*** 166,182 **** extern boolean_t tick_stick_emulation_active; #endif /* sun4v */ CPU_STATS_ADDQ(CPU, sys, trap, 1); - #ifdef SF_ERRATA_23 /* call causes illegal-insn */ - ASSERT((curthread->t_schedflag & TS_DONT_SWAP) || - (type == T_UNIMP_INSTR)); - #else - ASSERT(curthread->t_schedflag & TS_DONT_SWAP); - #endif /* SF_ERRATA_23 */ - if (USERMODE(rp->r_tstate) || (type & T_USER)) { /* * Set lwp_state before trying to acquire any * adaptive lock */ --- 166,175 ----
*** 1370,1381 **** uint32_t inst; utrap_handler_t *utrapp; CPU_STATS_ADDQ(CPU, sys, trap, 1); - ASSERT(curthread->t_schedflag & TS_DONT_SWAP); - if (USERMODE(rp->r_tstate)) { /* * Set lwp_state before trying to acquire any * adaptive lock */ --- 1363,1372 ----