summaryrefslogtreecommitdiff
path: root/usr/src/cmd
diff options
context:
space:
mode:
authorJonathan W Adams <Jonathan.Adams@Sun.COM>2008-08-12 16:37:39 -0700
committerJonathan W Adams <Jonathan.Adams@Sun.COM>2008-08-12 16:37:39 -0700
commit0fab61babcfe4e703c15518d8ef8d07e1a545650 (patch)
tree2e5342875a4f70e780960870c67a70329bd37e09 /usr/src/cmd
parent20ed34cc7e9de957ef6251e20c0f2d8e43847ea0 (diff)
downloadillumos-joyent-0fab61babcfe4e703c15518d8ef8d07e1a545650.tar.gz
6735592 "zio" vmem arenas are confusing, not reported separately
6699438 zfs induces crosscall storm under heavy mapped sequential read workload
Diffstat (limited to 'usr/src/cmd')
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/memory.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/usr/src/cmd/mdb/common/modules/genunix/memory.c b/usr/src/cmd/mdb/common/modules/genunix/memory.c
index 6f4ef1ad58..3cff33d22f 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/memory.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/memory.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <mdb/mdb_modapi.h>
#include <sys/types.h>
#include <vm/page.h>
@@ -221,6 +219,7 @@ typedef struct memstat {
struct vnode *ms_kvp; /* Cached address of kernel vnode */
struct vnode *ms_zvp; /* Cached address of zio vnode */
uint64_t ms_kmem; /* Pages of kernel memory */
+ uint64_t ms_zfs_data; /* Pages of zfs data */
uint64_t ms_anon; /* Pages of anonymous memory */
uint64_t ms_vnode; /* Pages of named (vnode) memory */
uint64_t ms_exec; /* Pages of exec/library memory */
@@ -229,8 +228,10 @@ typedef struct memstat {
} memstat_t;
#define MS_PP_ISKAS(pp, stats) \
- (((pp)->p_vnode == (stats)->ms_kvp) || \
- (((stats)->ms_zvp != NULL) && ((pp)->p_vnode == (stats)->ms_zvp)))
+ ((pp)->p_vnode == (stats)->ms_kvp)
+
+#define MS_PP_ISZFS_DATA(pp, stats) \
+ (((stats)->ms_zvp != NULL) && ((pp)->p_vnode == (stats)->ms_zvp))
/*
* Summarize pages by type; called from page walker.
@@ -258,6 +259,8 @@ memstat_callback(page_t *page, page_t *pp, memstat_t *stats)
stats->ms_cachelist++;
else if (vp && IS_SWAPFSVP(vp))
stats->ms_anon++;
+ else if (MS_PP_ISZFS_DATA(pp, stats))
+ stats->ms_zfs_data++;
else if (MS_PP_ISKAS(pp, stats))
stats->ms_kmem++;
else if (vp && (((vp)->v_flag & VVMEXEC)) != 0)
@@ -371,6 +374,13 @@ memstat(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
stats.ms_kmem,
(uint64_t)stats.ms_kmem * pagesize / (1024 * 1024),
MS_PCT_TOTAL(stats.ms_kmem));
+
+ if (stats.ms_zfs_data != 0)
+ mdb_printf("ZFS File Data %16llu %16llu %3lu%%\n",
+ stats.ms_zfs_data,
+ (uint64_t)stats.ms_zfs_data * pagesize / (1024 * 1024),
+ MS_PCT_TOTAL(stats.ms_zfs_data));
+
mdb_printf("Anon %16llu %16llu %3lu%%\n",
stats.ms_anon,
(uint64_t)stats.ms_anon * pagesize / (1024 * 1024),