From 26ba0eb55ca13bca8cb911b471a949574a3b513b Mon Sep 17 00:00:00 2001 From: bmilekic Date: Thu, 20 Feb 2003 04:26:58 +0000 Subject: o Allow "buckets" in mb_alloc to be differently sized (according to compile-time constants). That is, a "bucket" now is not necessarily a page-worth of mbufs or clusters, but it is MBUF_BUCK_SZ, CLUS_BUCK_SZ worth of mbufs, clusters. o Rename {mbuf,clust}_limit to {mbuf,clust}_hiwm and introduce {mbuf,clust}_lowm, which currently has no effect but will be used to set the low watermarks. o Fix netstat so that it can deal with the differently-sized buckets and teach it about the low watermarks too. o Make sure the per-cpu stats for an absent CPU has mb_active set to 0, explicitly. o Get rid of the allocate refcounts from mbuf map mess. Instead, just malloc() the refcounts in one shot from mbuf_init() o Clean up / update comments in subr_mbuf.c --- usr.bin/netstat/main.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'usr.bin/netstat/main.c') diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index d674227..4409f4b 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -153,10 +153,10 @@ static struct nlist nl[] = { { "_nmbclusters" }, #define N_NMBUFS 41 { "_nmbufs" }, -#define N_MBLIM 42 - { "_mbuf_limit" }, -#define N_CLLIM 43 - { "_clust_limit" }, +#define N_MBHI 42 + { "_mbuf_hiwm" }, +#define N_CLHI 43 + { "_clust_hiwm" }, #define N_NCPUS 44 { "_smp_cpus" }, #define N_PAGESZ 45 @@ -165,6 +165,10 @@ static struct nlist nl[] = { { "_mb_statpcpu" }, #define N_RTTRASH 47 { "_rttrash" }, +#define N_MBLO 48 + { "_mbuf_lowm" }, +#define N_CLLO 49 + { "_clust_lowm" }, { "" }, }; @@ -500,13 +504,15 @@ main(int argc, char *argv[]) nl[N_MBTYPES].n_value, nl[N_NMBCLUSTERS].n_value, nl[N_NMBUFS].n_value, - nl[N_MBLIM].n_value, - nl[N_CLLIM].n_value, + nl[N_MBHI].n_value, + nl[N_CLHI].n_value, + nl[N_MBLO].n_value, + nl[N_CLLO].n_value, nl[N_NCPUS].n_value, nl[N_PAGESZ].n_value, nl[N_MBPSTAT].n_value); } else - mbpr(0, 0, 0, 0, 0, 0, 0, 0, 0); + mbpr(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); exit(0); } #if 0 -- cgit v1.1