WIP: Expand directory handle cache to also cache non-root directories

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

 



Steve, List

Do not apply to the tree, but please review and comment.

Please see a Work-In-Progress patch series for expanding the handle cache
to start caching any directories, not just root.
Currently the limit is arbitrarily set to 16.
The first 8 patches are trivial and mostly just moving some functions
around without affecting behavior. They prepare the cifs module to 
mostly only access the details of struct cached_fid from the file
cached_fid.c

The 9th patch is where the actual meat is and where we now dynamically
create cached directory structures and keep them on a list hanging off
struct cached_fids.

This now means that we can safely, while holding a lease, do "ls /mnt/...
 >/dev/null" and only the first directory listing will result in network i/o.

What is still misisng and what we need to implement before we will get any
major boosts in performance is to also track the "dentry" for the cached dir.
I currently only cached hte dentry for the root, because it is easy to
get this from the superblock. But we will need to walk the dentries and ALSO
get() and use the dentry for all other directories that we cache.
This will be very important to do for performance as this will allow
us to serve attributes for the entries of the cached directory out of cache.
See inode.c:cifs_dentry_needs_reval()

I do not yet do that because "cifs: start caching all ..." is already big enough
as a patch as is, but I will implement walking the dentries and improve this
caching next.






[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux