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
*** 146,156 ****
*/
t0.t_stk = (caddr_t)rp - REGOFF;
/* Can't use va_to_pa here - wait until prom_ initialized */
t0.t_stkbase = t0stack;
t0.t_pri = maxclsyspri - 3;
! t0.t_schedflag = TS_LOAD | TS_DONT_SWAP;
t0.t_procp = &p0;
t0.t_plockp = &p0lock.pl_lock;
t0.t_lwp = &lwp0;
t0.t_forw = &t0;
t0.t_back = &t0;
--- 146,156 ----
*/
t0.t_stk = (caddr_t)rp - REGOFF;
/* Can't use va_to_pa here - wait until prom_ initialized */
t0.t_stkbase = t0stack;
t0.t_pri = maxclsyspri - 3;
! t0.t_schedflag = 0;
t0.t_procp = &p0;
t0.t_plockp = &p0lock.pl_lock;
t0.t_lwp = &lwp0;
t0.t_forw = &t0;
t0.t_back = &t0;