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

*** 4320,4337 **** if (t->t_stkbase == NULL) return (WALK_NEXT); /* - * Warn about swapped out threads, but drive on anyway - */ - if (!(t->t_schedflag & TS_LOAD)) { - mdb_warn("thread %p's stack swapped out\n", addr); - return (WALK_NEXT); - } - - /* * Search the thread's stack for the given pointer. Note that it would * be more efficient to follow ::kgrep's lead and read in page-sized * chunks, but this routine is already fast and simple. */ for (current = (uintptr_t)t->t_stkbase; current < (uintptr_t)t->t_stk; --- 4320,4329 ----