schwarze@ pointed out that systat(1) refers to a non-documented
function: uvm_swap_get().  I doubt referencing a UVM function is
something appropriate.  Diff below tries to explain in word what the
counter is: the number of swap page that have been read from disk.

It is not only incremented in the page fault handler, so I used the
word 'moved'.

Comments, oks?

Index: usr.bin/systat/systat.1
===================================================================
RCS file: /cvs/src/usr.bin/systat/systat.1,v
retrieving revision 1.114
diff -u -p -r1.114 systat.1
--- usr.bin/systat/systat.1     16 Jan 2020 16:46:47 -0000      1.114
+++ usr.bin/systat/systat.1     22 Apr 2020 21:16:00 -0000
@@ -715,7 +715,7 @@ swap pages in use
 .It swpgonly
 in use swap pages not in RAM
 .It nswget
-fault called uvm_swap_get()
+swap pages moved from disk to RAM
 .It nanon
 total anon's
 .Pp
Index: sys/uvm/uvmexp.h
===================================================================
RCS file: /cvs/src/sys/uvm/uvmexp.h,v
retrieving revision 1.4
diff -u -p -r1.4 uvmexp.h
--- sys/uvm/uvmexp.h    6 Nov 2018 07:49:38 -0000       1.4
+++ sys/uvm/uvmexp.h    22 Apr 2020 21:15:37 -0000
@@ -78,7 +78,7 @@ struct uvmexp {
        int swpages;    /* number of PAGE_SIZE'ed swap pages */
        int swpginuse;  /* number of swap pages in use */
        int swpgonly;   /* number of swap pages in use, not also in RAM */
-       int nswget;     /* number of times fault calls uvm_swap_get() */
+       int nswget;     /* number of swap pages moved from disk to RAM */
        int nanon;      /* XXX number total of anon's in system */
        int unused05;   /* formerly nanonneeded */
        int unused06;   /* formerly nfreeanon */

Reply via email to