Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 1997 12:08:45 +0900 (JST)
From:      Michael Hancock <michaelh@cet.co.jp>
To:        David Greenman <dg@root.com>
Cc:        Don Lewis <Don.Lewis@tsc.tdk.com>, fs@freebsd.org
Subject:   Re: the namei cache... 
Message-ID:  <Pine.SV4.3.95.970425114918.16713A-100000@parkplace.cet.co.jp>
In-Reply-To: <199704250052.RAA12150@root.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Apr 1997, David Greenman wrote:

> >This is right from the source:
> >
> >	cnp->cn_hash = 0;
> >	for (cp = cnp->cn_nameptr; *cp != 0 && *cp != '/'; cp++)
> >		cnp->cn_hash += (unsigned char)*cp;
> >	cnp->cn_namelen = cp - cnp->cn_nameptr;
> >
> >It sure looks to me like it stops on '/' ;-)
> >
> >Also, even if you totally ditch the hash, you still need the loop
> >to find the end of the component.
> 
>    Good point, although I guess you could always waste a "null" longword at
> the end and trigger on that. Hmmm.

An improved hash looks like low hanging fruit that's worth trying.

Regarding the name list of the vnode approach, it might be interesting try
phk's patches and see how it works out with something like WorldStone. 
The approach to the name cache / vnode cache coherency problem he's trying
to solve makes sense logically. 

However, addressing the performance needs of news servers or large
/var/mail directories might lead to a lot of complications.  It's like you
need some kind of dynamic hash table creation capability for each
directory vnode.  I don't think this is practical. 

Regards,


Mike




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.970425114918.16713A-100000>