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
@@ -29,12 +29,10 @@
/*
* Portions of this source code were derived from Berkeley 4.3 BSD
* under license from the Regents of the University of California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* VM - segment for non-faulting loads.
*/
#include <sys/types.h>
@@ -95,11 +93,10 @@
(faultcode_t (*)(struct seg *, caddr_t))
segnf_nomap, /* faulta */
segnf_setprot,
segnf_checkprot,
(int (*)())segnf_badop, /* kluster */
- (size_t (*)(struct seg *))NULL, /* swapout */
(int (*)(struct seg *, caddr_t, size_t, int, uint_t))
segnf_nop, /* sync */
(size_t (*)(struct seg *, caddr_t, size_t, char *))
segnf_nop, /* incore */
(int (*)(struct seg *, caddr_t, size_t, int, int, ulong_t *, size_t))