diff options
author | ivoras <ivoras@FreeBSD.org> | 2010-07-23 12:30:29 +0000 |
---|---|---|
committer | ivoras <ivoras@FreeBSD.org> | 2010-07-23 12:30:29 +0000 |
commit | dd4be6368db263ed60f23e3ad7991a4e8dd7b746 (patch) | |
tree | 5d3eb194950ef6bc58932940e9721a9eba0d3dc1 /sys/kern/vfs_bio.c | |
parent | a6198465870ecad0428d823988838d909c1b779b (diff) | |
download | FreeBSD-src-dd4be6368db263ed60f23e3ad7991a4e8dd7b746.zip FreeBSD-src-dd4be6368db263ed60f23e3ad7991a4e8dd7b746.tar.gz |
Make lorunningspace catch up with hirunningspace.
While there, add comment about the magic numbers.
Prodded by: alc
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 416b46b..1bc259f 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -620,9 +620,14 @@ bufinit(void) hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBSIZE * 10); lobufspace = hibufspace - MAXBSIZE; - lorunningspace = 512 * 1024; + /* + * Note: The 16 MB upper limit for hirunningspace was chosen + * arbitrarily and may need further tuning. The lower 1 MB + * limit is the historical upper limit for hirunningspace. + */ hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE), 16 * 1024 * 1024), 1024 * 1024); + lorunningspace = roundup(hirunningspace / 2, MAXBSIZE); /* * Limit the amount of malloc memory since it is wired permanently into |