Date: Fri, 25 Apr 1997 18:31:45 +0900 (JST) From: Michael Hancock <michaelh@cet.co.jp> To: Bakul Shah <bakul@torrentnet.com> Cc: FreeBSD Hackers <hackers@FreeBSD.org> Subject: Re: the namei cache... Message-ID: <Pine.SV4.3.95.970425182756.19267A-100000@parkplace.cet.co.jp> In-Reply-To: <Pine.SV4.3.95.970425163021.18617B-100000@parkplace.cet.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
Oops, off by one when using a mask instead of a prime. It probably wouldn't have bit you anyway. On Fri, 25 Apr 1997, Michael Hancock wrote: > Index: vfs_cache.c > =================================================================== > RCS file: /jaz/cvs/src/sys/kern/vfs_cache.c,v > retrieving revision 1.20 > diff -r1.20 vfs_cache.c > 144c144 > < ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) % nchash]; > --- > > ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) & nchash]; > 249c249 > < ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) % nchash]; > --- > > ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) & nchash]; > 262c262 > < nchashtbl = phashinit(desiredvnodes, M_CACHE, &nchash); > --- > > nchashtbl = hashinit(desiredvnodes, M_CACHE, &nchash); Index: vfs_cache.c =================================================================== RCS file: /jaz/cvs/src/sys/kern/vfs_cache.c,v retrieving revision 1.20 diff -r1.20 vfs_cache.c 144c144 < ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) % nchash]; --- > ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) & nchash]; 249c249 < ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) % nchash]; --- > ncpp = &nchashtbl[(dvp->v_id + cnp->cn_hash) & nchash]; 262c262 < nchashtbl = phashinit(desiredvnodes, M_CACHE, &nchash); --- > nchashtbl = hashinit(desiredvnodes, M_CACHE, &nchash); 286c286 < for (ncpp = &nchashtbl[nchash - 1]; ncpp >= nchashtbl; ncpp--) { --- > for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) { 312c312 < for (ncpp = &nchashtbl[nchash - 1]; ncpp >= nchashtbl; ncpp--) { --- > for (ncpp = &nchashtbl[nchash]; ncpp >= nchashtbl; ncpp--) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.970425182756.19267A-100000>