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
@@ -79,12 +79,10 @@
int (*cl_parmsset)(kthread_t *, void *, id_t, cred_t *);
void (*cl_stop)(kthread_t *, int, int);
void (*cl_exit)(kthread_t *);
void (*cl_active)(kthread_t *);
void (*cl_inactive)(kthread_t *);
- pri_t (*cl_swapin)(kthread_t *, int);
- pri_t (*cl_swapout)(kthread_t *, int);
void (*cl_trapret)(kthread_t *);
void (*cl_preempt)(kthread_t *);
void (*cl_setrun)(kthread_t *);
void (*cl_sleep)(kthread_t *);
void (*cl_tick)(kthread_t *);
@@ -194,14 +192,10 @@
#define CL_ACTIVE(t) (*(t)->t_clfuncs->cl_active)(t)
#define CL_INACTIVE(t) (*(t)->t_clfuncs->cl_inactive)(t)
-#define CL_SWAPIN(t, flags) (*(t)->t_clfuncs->cl_swapin)(t, flags)
-
-#define CL_SWAPOUT(t, flags) (*(t)->t_clfuncs->cl_swapout)(t, flags)
-
#define CL_TICK(t) (*(t)->t_clfuncs->cl_tick)(t)
#define CL_TRAPRET(t) (*(t)->t_clfuncs->cl_trapret)(t)
#define CL_WAKEUP(t) (*(t)->t_clfuncs->cl_wakeup)(t)