Messages in this thread | | | Date | Sun, 13 Sep 1998 08:17:57 -0400 | From | Bill Hawes <> | Subject | Re: Improved dcache name hash |
| |
Colin Plumb wrote:
> If the file gets moved, it might also change names, so the name gets rehashed > regardless. (The code is "find dentry for source; find dentry for dest; > check for legality; shuffle inodes") > > I checked, and a parent dentry is always known when the name is hashed, > and the parent never changes.
OK, the parent isn't needed for the hash. The parent dentry _does_ change, but the dentry changes names at the same time, so the hashed position remains the same.
> Let's just say that it appears that not too random is *good*, as we are > getting more uniformity than truly random would provide. > > So much for ingenuity. Hash #2 does slightly better, but hardly > significantly better. I don't like the existing hash particularly because > 4 divides 32, so the 1st and 9th bytes are treated identically. But > maybe, even if I think it looks wrong, it ain't broke.
Maybe since filenames themselves aren't very random, the current scheme works very well with typical sets of filenames. Anyway, it's good to know the current algorithm is working well.
Regards, Bill
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/faq.html
| |