diff options
author | silby <silby@FreeBSD.org> | 2003-12-27 07:52:47 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2003-12-27 07:52:47 +0000 |
commit | 5c5418dd6e3fd1a458707433f5509baf8876a0ef (patch) | |
tree | 98b609cd809b91f8fe99dba49d5591243871a9a2 /sys/sparc64 | |
parent | b82aa9e5c7a65948641e2fec0986f7b05a84b3a4 (diff) | |
download | FreeBSD-src-5c5418dd6e3fd1a458707433f5509baf8876a0ef.zip FreeBSD-src-5c5418dd6e3fd1a458707433f5509baf8876a0ef.tar.gz |
Track current and peak sfbuf usage, export the values via sysctl.
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/vm_machdep.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index e29b48a..2400895 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -100,6 +100,7 @@ static struct { } sf_freelist; static u_int sf_buf_alloc_want; +extern int nsfbufspeak, nsfbufsused; PMAP_STATS_VAR(uma_nsmall_alloc); PMAP_STATS_VAR(uma_nsmall_alloc_oc); @@ -409,6 +410,8 @@ sf_buf_alloc(struct vm_page *m) if (sf != NULL) { SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; + nsfbufsused++; + nsfbufspeak = max(nsfbufspeak, nsfbufsused); pmap_qenter(sf->kva, &sf->m, 1); } mtx_unlock(&sf_freelist.sf_lock); @@ -440,6 +443,7 @@ sf_buf_free(void *addr, void *args) sf->m = NULL; mtx_lock(&sf_freelist.sf_lock); SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf, free_list); + nsfbufsused--; if (sf_buf_alloc_want > 0) wakeup_one(&sf_freelist); mtx_unlock(&sf_freelist.sf_lock); |