From owner-cvs-src@FreeBSD.ORG Wed Dec 3 20:30:02 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02E3716A4CE; Wed, 3 Dec 2003 20:30:02 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12B0C43FE0; Wed, 3 Dec 2003 20:29:58 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id hB44TjeF033327; Wed, 3 Dec 2003 20:29:49 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200312040429.hB44TjeF033327@gw.catspoiler.org> Date: Wed, 3 Dec 2003 20:29:45 -0800 (PST) From: Don Lewis To: nate@root.org In-Reply-To: <20031203195731.G21901@root.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_bio.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2003 04:30:02 -0000 On 3 Dec, Nate Lawson wrote: > On Wed, 3 Dec 2003, Don Lewis wrote: >> Modified files: (Branch: RELENG_4) >> sys/kern vfs_bio.c >> Log: >> The existing hash algorithm in bufhash() does not distribute entries >> very well across buckets, especially in the case of cylinder group blocks >> which are located at a sequence of locations that are a multiple of a large >> power of two apart. In the case of large file systems, one or possibly >> a few of the hash chains can get excessively long. Replace the existing >> hash algorithm with a variation on the Fibonacci hash. >> >> Tested by: Ken Marx >> >> Revision Changes Path >> 1.242.2.22 +37 -2 src/sys/kern/vfs_bio.c > > This is excellent. MTC? (Merge To Current) :) Nope, -CURRENT uses a splay tree instead of a hash table here. > Also, whitespace nit: > >> + * Volume 3 / Sorting and Searching_ >> + * >> + * We reduce the argument to 32 bits before doing the hash to >> + * avoid the need for a slow 64x64 multiply on 32 bit platforms. >> + * Grumble ... actually two. Fix committed.