diff options
author | ru <ru@FreeBSD.org> | 2006-11-20 00:16:00 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-11-20 00:16:00 +0000 |
commit | e58221ee6f2ded07307d488ff72b3c7048cdffb2 (patch) | |
tree | 007b9a1af94d658f717af5d5d40d3165d3a7d115 | |
parent | 9eab84088806630d52ee53733224128facef6879 (diff) | |
download | FreeBSD-src-e58221ee6f2ded07307d488ff72b3c7048cdffb2.zip FreeBSD-src-e58221ee6f2ded07307d488ff72b3c7048cdffb2.tar.gz |
When counting vm totals, skip unreferenced objects, including
vnodes representing mounted file systems.
Reviewed by: alc
MFC after: 3 days
-rw-r--r-- | sys/vm/vm_meter.c | 7 |
1 files changed, 7 insertions, 0 deletions
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) { |