From owner-cvs-all Tue Jul 10 14:21:36 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 12D5137B403; Tue, 10 Jul 2001 14:21:30 -0700 (PDT) (envelope-from iedowse@FreeBSD.org) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f6ALLUw38626; Tue, 10 Jul 2001 14:21:30 -0700 (PDT) (envelope-from iedowse) Message-Id: <200107102121.f6ALLUw38626@freefall.freebsd.org> From: Ian Dowse Date: Tue, 10 Jul 2001 14:21:30 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/conf NOTES src/sys/conf files options src/sys/ufs/ufs dirhash.h ufs_dirhash.c inode.h ufs_inode.c ufs_lookup.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG iedowse 2001/07/10 14:21:30 PDT Modified files: sys/i386/conf NOTES sys/conf files options sys/ufs/ufs inode.h ufs_inode.c ufs_lookup.c Added files: sys/ufs/ufs dirhash.h ufs_dirhash.c Log: Bring in dirhash, a simple hash-based lookup optimisation for large directories. When enabled via "options UFS_DIRHASH", in-core hash arrays are maintained for large directories. These allow all directory operations to take place quickly instead of requiring long linear searches. For now anyway, dirhash is not enabled by default. The in-core hash arrays have a memory requirement that is approximately half the size of the size of the on-disk directory file. A number of new sysctl variables allow control over which directories get hashed and over the maximum amount of memory that dirhash will use: vfs.ufs.dirhash_minsize The minimum on-disk directory size for which hashing should be used. The default is 2560 (2.5k). vfs.ufs.dirhash_maxmem The system-wide maximum total memory to be used by dirhash data structures. The default is 2097152 (2MB). The current amount of memory being used by dirhash is visible through the read-only sysctl variable vfs.ufs.dirhash_maxmem. Finally, some extra sanity checks that are enabled by default, but which may have an impact on performance, can be disabled by setting vfs.ufs.dirhash_docheck to 0. Discussed on: -fs, -hackers Revision Changes Path 1.933 +5 -1 src/sys/i386/conf/NOTES 1.549 +2 -1 src/sys/conf/files 1.284 +4 -1 src/sys/conf/options 1.35 +3 -1 src/sys/ufs/ufs/inode.h 1.37 +9 -1 src/sys/ufs/ufs/ufs_inode.c 1.50 +94 -3 src/sys/ufs/ufs/ufs_lookup.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message