diff options
author | silby <silby@FreeBSD.org> | 2003-12-28 01:43:22 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2003-12-28 01:43:22 +0000 |
commit | a58bddbe366329e88f05c837f6874cc20db6a2cb (patch) | |
tree | 5450bb93ec0abf65fe5f9617cee3907e9fd50330 /sys | |
parent | 5c61422855f8b82832cda590e960e1dc770a9855 (diff) | |
download | FreeBSD-src-a58bddbe366329e88f05c837f6874cc20db6a2cb.zip FreeBSD-src-a58bddbe366329e88f05c837f6874cc20db6a2cb.tar.gz |
Move the declaration of sfbufspeak and sfbufsused to mbuf.h,
and use imax instead of max, as sfbufspeak and sfbufsused
are signed.
Submitted by: bde
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/vm_machdep.c | 3 | ||||
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 5 | ||||
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 3 | ||||
-rw-r--r-- | sys/powerpc/aim/vm_machdep.c | 3 | ||||
-rw-r--r-- | sys/powerpc/powerpc/vm_machdep.c | 3 | ||||
-rw-r--r-- | sys/sparc64/sparc64/vm_machdep.c | 3 | ||||
-rw-r--r-- | sys/sys/mbuf.h | 4 |
8 files changed, 11 insertions, 16 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index a1c648b..1d7484b 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -116,7 +116,6 @@ static struct { } sf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; /* * Finish a fork operation, with process p2 nearly set up. @@ -430,7 +429,7 @@ sf_buf_alloc(struct vm_page *m) SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); } mtx_unlock(&sf_freelist.sf_lock); return (sf); diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index ef19790..d7c2c68 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -99,7 +99,6 @@ static struct { } sf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; /* * Finish a fork operation, with process p2 nearly set up. @@ -475,7 +474,7 @@ sf_buf_alloc(struct vm_page *m) SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); } mtx_unlock(&sf_freelist.sf_lock); return (sf); diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index c32476e..eebb04e 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -112,7 +112,6 @@ static u_long sf_buf_hashmask; static TAILQ_HEAD(, sf_buf) sf_buf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; /* * A lock used to synchronize access to the hash table and free list @@ -615,7 +614,7 @@ sf_buf_alloc(struct vm_page *m) sf->ref_count++; if (sf->ref_count == 1) { nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); } goto done; } @@ -639,7 +638,7 @@ sf_buf_alloc(struct vm_page *m) sf->ref_count = 1; sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); pmap_qenter(sf->kva, &sf->m, 1); done: mtx_unlock(&sf_buf_lock); diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index ae59aab..10c6a61 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -113,7 +113,6 @@ static struct { } sf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; void cpu_thread_exit(struct thread *td) @@ -367,7 +366,7 @@ sf_buf_alloc(struct vm_page *m) SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); } mtx_unlock(&sf_freelist.sf_lock); return (sf); diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index a68b4ea..5fd9c65 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -116,7 +116,6 @@ static struct { } sf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; /* * Finish a fork operation, with process p2 nearly set up. @@ -284,7 +283,7 @@ sf_buf_alloc(struct vm_page *m) SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); pmap_qenter(sf->kva, &sf->m, 1); } mtx_unlock(&sf_freelist.sf_lock); diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index a68b4ea..5fd9c65 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -116,7 +116,6 @@ static struct { } sf_freelist; static u_int sf_buf_alloc_want; -extern int nsfbufspeak, nsfbufsused; /* * Finish a fork operation, with process p2 nearly set up. @@ -284,7 +283,7 @@ sf_buf_alloc(struct vm_page *m) SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); pmap_qenter(sf->kva, &sf->m, 1); } mtx_unlock(&sf_freelist.sf_lock); diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index 2400895..51a232b 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -100,7 +100,6 @@ 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); @@ -411,7 +410,7 @@ sf_buf_alloc(struct vm_page *m) SLIST_REMOVE_HEAD(&sf_freelist.sf_head, free_list); sf->m = m; nsfbufsused++; - nsfbufspeak = max(nsfbufspeak, nsfbufsused); + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); pmap_qenter(sf->kva, &sf->m, 1); } mtx_unlock(&sf_freelist.sf_lock); diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 1c2cb3e..eff28ca 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -431,7 +431,9 @@ extern struct mbstat mbstat; /* General mbuf stats/infos */ extern int nmbclusters; /* Maximum number of clusters */ extern int nmbcnt; /* Scale kmem_map for counter space */ extern int nmbufs; /* Maximum number of mbufs */ -extern int nsfbufs; /* Number of sendfile(2) bufs */ +extern int nsfbufs; /* Number of sendfile(2) bufs alloced */ +extern int nsfbufspeak; /* Peak of nsfbufsused */ +extern int nsfbufsused; /* Number of sendfile(2) bufs in use */ void _mext_free(struct mbuf *); void m_adj(struct mbuf *, int); |