From owner-cvs-all Sat Mar 17 1:31:11 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 1449D37B718; Sat, 17 Mar 2001 01:31:07 -0800 (PST) (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2H9V7h77652; Sat, 17 Mar 2001 01:31:07 -0800 (PST) (envelope-from peter) Message-Id: <200103170931.f2H9V7h77652@freefall.freebsd.org> From: Peter Wemm Date: Sat, 17 Mar 2001 01:31:06 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/alpha/include types.h src/sys/i386/include types.h src/sys/ia64/include types.h src/sys/powerpc/include types.h src/sys/kern vfs_cache.c src/sys/nfs nfs.h nfs_node.c src/sys/sys fnv_hash.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG peter 2001/03/17 01:31:06 PST Modified files: sys/alpha/include types.h sys/i386/include types.h sys/ia64/include types.h sys/powerpc/include types.h sys/kern vfs_cache.c sys/nfs nfs.h nfs_node.c Added files: sys/sys fnv_hash.h Log: Use a generic implementation of the Fowler/Noll/Vo hash (FNV hash). Make the name cache hash as well as the nfsnode hash use it. As a special tweak, create an unsigned version of register_t. This allows us to use a special tweak for the 64 bit versions that significantly speeds up the i386 version (ie: int64 XOR int64 is slower than int64 XOR int32). The code layout is a little strange for the string function, but I was able to get between 5 to 10% improvement over the original version I started with. The layout affects gcc code generation choices and this way was fastest on x86 and alpha. Note that 'CPUTYPE=p3' etc makes a fair difference to this. It is around 45% faster with -march=pentiumpro on a p6 cpu. Revision Changes Path 1.14 +2 -2 src/sys/alpha/include/types.h 1.21 +2 -2 src/sys/i386/include/types.h 1.2 +2 -2 src/sys/ia64/include/types.h 1.2 +2 -1 src/sys/powerpc/include/types.h 1.53 +7 -14 src/sys/kern/vfs_cache.c 1.58 +1 -2 src/sys/nfs/nfs.h 1.44 +3 -29 src/sys/nfs/nfs_node.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message