diff options
author | silby <silby@FreeBSD.org> | 2003-08-11 05:51:51 +0000 |
---|---|---|
committer | silby <silby@FreeBSD.org> | 2003-08-11 05:51:51 +0000 |
commit | bd71f7b671e366859e8f21e4a701d9e2983c983a (patch) | |
tree | 7efbff8c0c8f8b69e755e549cc66602574c40aaf /sys/kern/subr_param.c | |
parent | 1bb319c2485b484e6bb7d594064ec61ef4dfeb7e (diff) | |
download | FreeBSD-src-bd71f7b671e366859e8f21e4a701d9e2983c983a.zip FreeBSD-src-bd71f7b671e366859e8f21e4a701d9e2983c983a.tar.gz |
More pipe changes:
From alc:
Move pageable pipe memory to a seperate kernel submap to avoid awkward
vm map interlocking issues. (Bad explanation provided by me.)
From me:
Rework pipespace accounting code to handle this new layout, and adjust
our default values to account for the fact that we now have a solid
limit on allocations.
Also, remove the "maxpipes" limit, as it no longer has a purpose.
(The limit on kva usage solves the problem of having two many pipes.)
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r-- | sys/kern/subr_param.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 0482aa9..05e6ab9 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -77,7 +77,6 @@ int nbuf; int nswbuf; int maxswzone; /* max swmeta KVA storage */ int maxbcache; /* max buffer cache KVA storage */ -int maxpipes; /* Limit on # of pipes */ int maxpipekva; /* Limit on pipe KVA */ int maxpipekvawired; /* Limit on wired pipe KVA */ u_quad_t maxtsiz; /* max text size */ @@ -180,19 +179,18 @@ void init_param3(long kmempages) { /* - * Limit number of pipes to a reasonable fraction of kmap entries, - * pageable pipe memory usage to 2.5% of the kernel map, and wired - * pipe memory usage to 1% of the same. Ensure that all have - * reasonable floors. (See sys_pipe.c for more info.) + * 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. + * (See sys_pipe.c for more info.) */ - maxpipes = kmempages / 5; - maxpipekva = (kmempages / 40) * PAGE_SIZE; - maxpipekvawired = (kmempages / 100) * PAGE_SIZE; + maxpipekva = (kmempages / 20) * PAGE_SIZE; + maxpipekvawired = (kmempages / 40) * PAGE_SIZE; - if (maxpipes < 128) - maxpipes = 128; if (maxpipekva < 512 * 1024) maxpipekva = 512 * 1024; if (maxpipekvawired < 512 * 1024) maxpipekvawired = 512 * 1024; + + TUNABLE_INT_FETCH("kern.ipc.maxpipekva", &maxpipekva); } |