summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2003-05-15 19:05:28 +0000
committerbmilekic <bmilekic@FreeBSD.org>2003-05-15 19:05:28 +0000
commitf48bcc48de0a67fdb1915dde82d3e150840ac9c6 (patch)
tree38fc4f060cf169e0a53109d86e86a77189e1e251
parent211414dc5e58705776a2a58363c1528176abedb4 (diff)
downloadFreeBSD-src-f48bcc48de0a67fdb1915dde82d3e150840ac9c6.zip
FreeBSD-src-f48bcc48de0a67fdb1915dde82d3e150840ac9c6.tar.gz
Make the mb_alloc low-watermark sysctl-tunable read-only and make
netstat(1) not display it for now because its effects are not yet completely implemented and we're about to cut 5.2-RELEASE. This is temporary. Approved by: re (scottl, rwatson)
-rw-r--r--sys/kern/subr_mbuf.c7
-rw-r--r--usr.bin/netstat/mbuf.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/kern/subr_mbuf.c b/sys/kern/subr_mbuf.c
index 8736526..692316f 100644
--- a/sys/kern/subr_mbuf.c
+++ b/sys/kern/subr_mbuf.c
@@ -53,6 +53,9 @@
/*
* mb_alloc: network buffer allocator
+ *
+ * XXX: currently, the "low watermark" sysctl is marked read-only as its
+ * effects are not completely implemented. To be fixed soon.
*/
/*
@@ -318,11 +321,11 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, mbuf_wait, CTLFLAG_RW, &mbuf_wait, 0,
"Sleep time of mbuf subsystem wait allocations during exhaustion");
SYSCTL_UINT(_kern_ipc, OID_AUTO, mbuf_hiwm, CTLFLAG_RW, &mbuf_hiwm, 0,
"Upper limit of number of mbufs allowed in each cache");
-SYSCTL_UINT(_kern_ipc, OID_AUTO, mbuf_lowm, CTLFLAG_RW, &mbuf_lowm, 0,
+SYSCTL_UINT(_kern_ipc, OID_AUTO, mbuf_lowm, CTLFLAG_RD, &mbuf_lowm, 0,
"Lower limit of number of mbufs allowed in each cache");
SYSCTL_UINT(_kern_ipc, OID_AUTO, clust_hiwm, CTLFLAG_RW, &clust_hiwm, 0,
"Upper limit of number of mbuf clusters allowed in each cache");
-SYSCTL_UINT(_kern_ipc, OID_AUTO, clust_lowm, CTLFLAG_RW, &clust_lowm, 0,
+SYSCTL_UINT(_kern_ipc, OID_AUTO, clust_lowm, CTLFLAG_RD, &clust_lowm, 0,
"Lower limit of number of mbuf clusters allowed in each cache");
SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, &mbstat, mbstat,
"Mbuf general information and statistics");
diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c
index 7c9b2b3..4da47cd 100644
--- a/usr.bin/netstat/mbuf.c
+++ b/usr.bin/netstat/mbuf.c
@@ -253,7 +253,9 @@ mbpr(u_long mbaddr, u_long mbtaddr __unused, u_long nmbcaddr, u_long nmbufaddr,
totused[0] = totnum - totfree;
printf("\tTotal:\t\t%lu/%lu (in use/in pool)\n", totused[0], totnum);
printf("\tMbuf cache high watermark: %d\n", mbuf_hiwm);
+#ifdef NOTYET
printf("\tMbuf cache low watermark: %d\n", mbuf_lowm);
+#endif
printf("\tMaximum possible: %d\n", nmbufs);
printf("\tAllocated mbuf types:\n");
for (mp = mbtypenames; mp->mt_name; mp++) {
@@ -292,7 +294,9 @@ mbpr(u_long mbaddr, u_long mbtaddr __unused, u_long nmbcaddr, u_long nmbufaddr,
totused[1] = totnum - totfree;
printf("\tTotal:\t\t%lu/%lu (in use/in pool)\n", totused[1], totnum);
printf("\tCluster cache high watermark: %d\n", clust_hiwm);
+#ifdef NOTYET
printf("\tCluster cache low watermark: %d\n", clust_lowm);
+#endif
printf("\tMaximum possible: %d\n", nmbclusters);
printf("\t%lu%% of cluster map consumed\n", ((totspace[1] * 100) /
(nmbclusters * MCLBYTES)));
OpenPOWER on IntegriCloud