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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs_srv.c
          +++ new/usr/src/uts/common/fs/nfs/nfs_srv.c
↓ open down ↓ 1207 lines elided ↑ open up ↑
1208 1208          ns->ns_status = RFSWRITE_INITVAL;
1209 1209  
1210 1210          nrp = &nrpsp;
1211 1211          nrp->wa = wa;
1212 1212          nrp->ns = ns;
1213 1213          nrp->req = req;
1214 1214          nrp->cr = cr;
1215 1215          nrp->ro = ro;
1216 1216          nrp->thread = curthread;
1217 1217  
1218      -        ASSERT(curthread->t_schedflag & TS_DONT_SWAP);
1219      -
1220 1218          /*
1221 1219           * Look to see if there is already a cluster started
1222 1220           * for this file.
1223 1221           */
1224 1222          mutex_enter(&rfs_async_write_lock);
1225 1223          for (lp = rfs_async_write_head; lp != NULL; lp = lp->next) {
1226 1224                  if (bcmp(&wa->wa_fhandle, lp->fhp,
1227 1225                      sizeof (fhandle_t)) == 0)
1228 1226                          break;
1229 1227          }
↓ open down ↓ 1783 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX