diff options
| author | Mike Silbersack <silby@FreeBSD.org> | 2003-08-11 05:51:51 +0000 |
|---|---|---|
| committer | Mike Silbersack <silby@FreeBSD.org> | 2003-08-11 05:51:51 +0000 |
| commit | cebde069783fcf0b43d9342c60ed0a6206b8706f (patch) | |
| tree | 7efbff8c0c8f8b69e755e549cc66602574c40aaf /sys/kern/subr_param.c | |
| parent | 5bff585104dfeeff914764b680489101a959e938 (diff) | |
Notes
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 0482aa935421..05e6ab92e988 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); } |
