summaryrefslogtreecommitdiffstats
path: root/sys/mips/mips
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-09-22 13:36:52 +0000
committerglebius <glebius@FreeBSD.org>2013-09-22 13:36:52 +0000
commit12fb397079ae31a26be56507235df63d4f0ef5a3 (patch)
tree9ba162f03b1c450c6c062e63e5a94fabaeb7f2d1 /sys/mips/mips
parent79894c60808ab81f99811a12ec76a9cfd16ec29d (diff)
downloadFreeBSD-src-12fb397079ae31a26be56507235df63d4f0ef5a3.zip
FreeBSD-src-12fb397079ae31a26be56507235df63d4f0ef5a3.tar.gz
- Create kern.ipc.sendfile namespace, and put the new "readhead" OID
there as "kern.ipc.sendfile.readahead". - Push all nsfbuf related tunables into MD code. Don't move them to new namespace in favor of POLA. Reviewed by: scottl Approved by: re (gjb)
Diffstat (limited to 'sys/mips/mips')
-rw-r--r--sys/mips/mips/vm_machdep.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c
index c42f640..0ef83a4 100644
--- a/sys/mips/mips/vm_machdep.c
+++ b/sys/mips/mips/vm_machdep.c
@@ -80,10 +80,6 @@ __FBSDID("$FreeBSD$");
#include <sys/sf_buf.h>
#endif
-#ifndef NSFBUFS
-#define NSFBUFS (512 + maxusers * 16)
-#endif
-
/* Duplicated from asm.h */
#if defined(__mips_o32)
#define SZREG 4
@@ -97,6 +93,22 @@ __FBSDID("$FreeBSD$");
#endif
#ifndef __mips_n64
+
+#ifndef NSFBUFS
+#define NSFBUFS (512 + maxusers * 16)
+#endif
+
+static int nsfbufs;
+static int nsfbufspeak;
+static int nsfbufsused;
+
+SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0,
+ "Maximum number of sendfile(2) sf_bufs available");
+SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0,
+ "Number of sendfile(2) sf_bufs at peak usage");
+SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0,
+ "Number of sendfile(2) sf_bufs in use");
+
static void sf_buf_init(void *arg);
SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL);
@@ -110,7 +122,7 @@ static struct {
} sf_freelist;
static u_int sf_buf_alloc_want;
-#endif
+#endif /* !__mips_n64 */
/*
* Finish a fork operation, with process p2 nearly set up.
OpenPOWER on IntegriCloud