From 8fb4c6b599d7fa91e11e38647e849dbac3dabf29 Mon Sep 17 00:00:00 2001 From: dillon Date: Mon, 27 Mar 2000 21:29:33 +0000 Subject: Commit the buffer cache cleanup patch to 4.x and 5.x. This patch fixes a fragmentation problem due to geteblk() reserving too much space for the buffer and imposes a larger granularity (16K) on KVA reservations for the buffer cache to avoid fragmentation issues. The buffer cache size calculations have been redone to simplify them (fewer defines, better comments, less chance of running out of KVA). The geteblk() fix solves a performance problem that DG was able reproduce. This patch does not completely fix the KVA fragmentation problems, but it goes a long way Mostly Reviewed by: bde and others Approved by: jkh --- sys/fs/msdosfs/msdosfs_vfsops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/fs') diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index 3c7b6b3..d5754f2 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -69,6 +69,8 @@ #include #include +#define MSDOSFS_DFLTBSIZE 4096 + #if 1 /*def PC98*/ /* * XXX - The boot signature formatted by NEC PC-98 DOS looks like a @@ -627,7 +629,7 @@ mountmsdosfs(devvp, mp, p, argp) if (FAT12(pmp)) pmp->pm_fatblocksize = 3 * pmp->pm_BytesPerSec; else - pmp->pm_fatblocksize = DFLTBSIZE; + pmp->pm_fatblocksize = MSDOSFS_DFLTBSIZE; pmp->pm_fatblocksec = pmp->pm_fatblocksize / DEV_BSIZE; pmp->pm_bnshift = ffs(DEV_BSIZE) - 1; -- cgit v1.1