Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [ad-namecache] src/sys



Module Name:    src
Committed By:   ad
Date:           Tue Jan 14 11:07:40 UTC 2020

Modified Files:
        src/sys/kern [ad-namecache]: vfs_cache.c
        src/sys/sys [ad-namecache]: namei.src vnode_impl.h

Log Message:
namecache:

This is working better than expected.  It seems to cut system time for
build.sh by ~10% on my test machine and joerg@ is seeing better results with
pbulk.  Improve it a bit more without changing the basic idea:

- Split cache_list_lock into a per-vnode rwlock for reverse lookup, and a
  lightly contended global lock on LRU state (cache_lru_lock),

- For LRU replacement, imitate the VM system's page replacement algorithm.
  This eliminates the writebacks to struct namecache (to track time of last
  hit).

- Dynamically allocate the per-directory lock, preparing the way for having
  a "struct nchdir" or similar which could contain stuff like different
  structures for lookup, cached info to do the equivalent of VOP_ACCESS() in
  cache, and so on.


To generate a diff of this commit:
cvs rdiff -u -r1.126.2.4 -r1.126.2.5 src/sys/kern/vfs_cache.c
cvs rdiff -u -r1.47.2.2 -r1.47.2.3 src/sys/sys/namei.src
cvs rdiff -u -r1.19.2.2 -r1.19.2.3 src/sys/sys/vnode_impl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index