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

@@ -147,11 +147,11 @@
         struct sysent *callp;
         struct sysent *se = LWP_GETSYSENT(lwp);
         int error = 0;
         uint_t nargs;
 
-        ASSERT(t == curthread && curthread->t_schedflag & TS_DONT_SWAP);
+        ASSERT(t == curthread);
 
         lwp->lwp_ru.sysc++;
         lwp->lwp_eosys = NORMALRETURN;  /* assume this will be normal */
 
         /*

@@ -241,12 +241,10 @@
         proc_t *p = ttoproc(t);
         int     repost;
 
         t->t_pre_sys = repost = 0;      /* clear pre-syscall processing flag */
 
-        ASSERT(t->t_schedflag & TS_DONT_SWAP);
-
 #if defined(DEBUG)
         /*
          * On the i386 kernel, lwp_ap points at the piece of the thread
          * stack that we copy the users arguments into.
          *