From e58221ee6f2ded07307d488ff72b3c7048cdffb2 Mon Sep 17 00:00:00 2001 From: ru Date: Mon, 20 Nov 2006 00:16:00 +0000 Subject: When counting vm totals, skip unreferenced objects, including vnodes representing mounted file systems. Reviewed by: alc MFC after: 3 days --- sys/vm/vm_meter.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys/vm/vm_meter.c') diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 709f9b5..7d9dd96 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -212,6 +212,13 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ continue; } + if (object->ref_count == 0) { + /* + * Also skip unreferenced objects, including + * vnodes representing mounted file systems. + */ + continue; + } totalp->t_vm += object->size; totalp->t_rm += object->resident_page_count; if (object->flags & OBJ_ACTIVE) { -- cgit v1.1