This is a discussion on Re: memory allocation during vfs_lookup within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On 9/6/07, Iruata Souza <iru.muzgo@gmail.com> wrote: > your better documentation really is source code and man pages. i'm > ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 9/6/07, Iruata Souza <iru.muzgo@gmail.com> wrote: > your better documentation really is source code and man pages. i'm > developing a filesystem capable of speaking 9P [1][2], the Plan 9 file > protocol [3], for OpenBSD and these has shown as a great source of > information. that sounds like an interesting project (I've done a little bit of playing with Plan9 myself) - let me know how it goes! > so, in my understanding of things... > > sys/kern/vfs_cache.c states: > "Cache is indexed by hash value obtained from (vp, name) where vp > refers to the directory containing name. " > > a name in a directory is hashed with it's parent directory vnode, one > at a time. it wouldn't make sense to me if the entire directory > contents where hashed since we're looking up only one entry. *nod* I was thinking along the lines of some kind of hash database; I see that this doesn't make much sense. > the lookup process is a serial one. i think this is why the cache is > so important. once you call lookup(), in sys/kern/vfs_lookup.c, it's > guaranteed that the path resolution process is done when it returns - > the name being found or not. so I guess now my question is more related to size of that cache, where it's stored, how it's managed, etc. > i hope that answers some of your questions. indeed - got me thinking in a different direction anyway. -- darkuncle@{gmail.com,darkuncle.net} || 0x5537F527 encrypted email to the latter address please http://darkuncle.net/pubkey.asc for public key |