summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_param.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-03-27 19:50:23 +0000
committeralc <alc@FreeBSD.org>2004-03-27 19:50:23 +0000
commit521fa573648e77e065d6d7c23fce9ecb40142021 (patch)
treeb2239967d5e44caa884de7b4dff736d434584c9d /sys/kern/subr_param.c
parenta0a0eebb33c39a00b7c2782c988328a830e43cd0 (diff)
downloadFreeBSD-src-521fa573648e77e065d6d7c23fce9ecb40142021.zip
FreeBSD-src-521fa573648e77e065d6d7c23fce9ecb40142021.tar.gz
Revise the direct or optimized case to use uiomove_fromphys() by the reader
instead of ephemeral mappings using pmap_qenter() by the writer. The writer is still, however, responsible for wiring the pages, just not mapping them. Consequently, the allocation of KVA for the direct case is unnecessary. Remove it and the sysctls limiting it, i.e., kern.ipc.maxpipekvawired and kern.ipc.amountpipekvawired. The number of temporarily wired pages is still, however, limited by kern.ipc.maxpipekva. Note: On platforms lacking a direct virtual-to-physical mapping, uiomove_fromphys() uses sf_bufs to cache ephemeral mappings. Thus, the number of available sf_bufs can influence the performance of pipes on platforms such i386. Surprisingly, I saw the greatest gain from this change on such a machine: lmbench's pipe bandwidth result increased from ~1050MB/s to ~1850MB/s on my 2.4GHz, 400MHz FSB P4 Xeon.
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r--sys/kern/subr_param.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index 9eca45f..e7421b7 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -82,7 +82,6 @@ int nswbuf;
int maxswzone; /* max swmeta KVA storage */
int maxbcache; /* max buffer cache KVA storage */
int maxpipekva; /* Limit on pipe KVA */
-int maxpipekvawired; /* Limit on wired pipe KVA */
u_quad_t maxtsiz; /* max text size */
u_quad_t dfldsiz; /* initial data size limit */
u_quad_t maxdsiz; /* max data size */
@@ -184,17 +183,13 @@ init_param3(long kmempages)
{
/*
* Limit pageable pipe memory usage to 5% of the kernel map
- * (via pipe_map), and nonpageable pipe memory usage to 2.5%
- * of the same. Ensure that all have reasonable floors.
+ * (via pipe_map). Ensure that all have reasonable floors.
* (See sys_pipe.c for more info.)
*/
maxpipekva = (kmempages / 20) * PAGE_SIZE;
- maxpipekvawired = (kmempages / 40) * PAGE_SIZE;
if (maxpipekva < 512 * 1024)
maxpipekva = 512 * 1024;
- if (maxpipekvawired < 512 * 1024)
- maxpipekvawired = 512 * 1024;
TUNABLE_INT_FETCH("kern.ipc.maxpipekva", &maxpipekva);
}
OpenPOWER on IntegriCloud