diff options
author | 2017-04-16 14:24:03 +0000 | |
---|---|---|
committer | 2017-04-16 14:24:03 +0000 | |
commit | ed1792d6a5dad4e0a680a3d98e03ee987da12d68 (patch) | |
tree | 388a56e355d052703613123521e400a773eef4cb | |
parent | Remove some defines marked #ifdef notyet, which really is #ifdef notever. (diff) | |
download | wireguard-openbsd-ed1792d6a5dad4e0a680a3d98e03ee987da12d68.tar.xz wireguard-openbsd-ed1792d6a5dad4e0a680a3d98e03ee987da12d68.zip |
Statistics for high memory flips in the buffer cache
nits from deraadt@
ok krw@ guenther@ kettenis@
-rw-r--r-- | sys/sys/mount.h | 5 | ||||
-rw-r--r-- | usr.bin/systat/iostat.c | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 90ce21e2117..8a58bcd5e00 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.h,v 1.129 2017/04/15 13:56:43 bluhm Exp $ */ +/* $OpenBSD: mount.h,v 1.130 2017/04/16 14:24:03 beck Exp $ */ /* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */ /* @@ -487,6 +487,9 @@ struct bcachestats { int64_t delwribufs; /* delayed write buffers */ int64_t kvaslots; /* kva slots total */ int64_t kvaslots_avail; /* available kva slots */ + int64_t highflips; /* total flips to above DMA */ + int64_t highflops; /* total failed flips to above DMA */ + int64_t dmaflips; /* total flips from high to DMA */ }; #ifdef _KERNEL extern struct bcachestats bcstats; diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c index a0bb03e11bc..ae32ff09eff 100644 --- a/usr.bin/systat/iostat.c +++ b/usr.bin/systat/iostat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iostat.c,v 1.46 2017/04/02 00:27:44 beck Exp $ */ +/* $OpenBSD: iostat.c,v 1.47 2017/04/16 14:24:03 beck Exp $ */ /* $NetBSD: iostat.c,v 1.5 1996/05/10 23:16:35 thorpej Exp $ */ /* @@ -257,4 +257,16 @@ showbcache(void) print_fld_str(FLD_IO_SSTR, "cache hits"); print_fld_ssize(FLD_IO_SVAL, bccur.cachehits - bclast.cachehits); end_line(); + + print_fld_str(FLD_IO_SSTR, "high flips"); + print_fld_ssize(FLD_IO_SVAL, bccur.highflips - bclast.highflips); + end_line(); + + print_fld_str(FLD_IO_SSTR, "high flops"); + print_fld_ssize(FLD_IO_SVAL, bccur.highflops - bclast.highflops); + end_line(); + + print_fld_str(FLD_IO_SSTR, "dma flips"); + print_fld_ssize(FLD_IO_SVAL, bccur.dmaflips - bclast.dmaflips); + end_line(); } |