summaryrefslogtreecommitdiffstats
path: root/sys/kern
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/kern
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/kern')
-rw-r--r--sys/kern/uipc_syscalls.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index bf4b52a..322550b 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -123,19 +123,11 @@ counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)];
/*
* sendfile(2)-related variables and associated sysctls
*/
-int nsfbufs;
-int nsfbufspeak;
-int nsfbufsused;
+static SYSCTL_NODE(_kern_ipc, OID_AUTO, sendfile, CTLFLAG_RW, 0,
+ "sendfile(2) tunables");
static int sfreadahead = 1;
-
-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");
-SYSCTL_INT(_kern_ipc, OID_AUTO, sfreadahead, CTLFLAG_RW, &sfreadahead, 0,
- "Number of sendfile(2) read-ahead MAXBSIZE blocks");
+SYSCTL_INT(_kern_ipc_sendfile, OID_AUTO, readahead, CTLFLAG_RW,
+ &sfreadahead, 0, "Number of sendfile(2) read-ahead MAXBSIZE blocks");
static void
OpenPOWER on IntegriCloud