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
*** 221,235 ****
* Mark the time when thread is placed on wait queue. The microstate
* accounting code uses this timestamp to determine wait times.
*/
t->t_waitrq = gethrtime_unscaled();
- /*
- * Mark thread as not swappable. If necessary, it will get
- * swapped out when it returns to the userland.
- */
- t->t_schedflag |= TS_DONT_SWAP;
DTRACE_SCHED1(cpucaps__sleep, kthread_t *, t);
waitq_link(wq, t);
THREAD_WAIT(t, &wq->wq_lock);
return (1);
--- 221,230 ----