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
@@ -652,17 +652,10 @@
continue;
thread_lock(t);
switch (t->t_state) {
case TS_SLEEP:
- /*
- * Don't touch the lwp is it is swapped out.
- */
- if (!(t->t_schedflag & TS_LOAD)) {
- mstate = LMS_SLEEP;
- break;
- }
switch (mstate = ttolwp(t)->lwp_mstate.ms_prev) {
case LMS_TFAULT:
case LMS_DFAULT:
case LMS_KFAULT:
case LMS_USER_LOCK: