Linux CIFS filesystem development
 help / color / mirror / Atom feed
* WIP: Expand directory handle cache to also cache non-root directories
@ 2022-08-09  2:11 Ronnie Sahlberg
  2022-08-09  2:11 ` [PATCH 1/9] cifs: Move cached-dir functions into a separate file Ronnie Sahlberg
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Ronnie Sahlberg @ 2022-08-09  2:11 UTC (permalink / raw)
  To: linux-cifs; +Cc: Steve French

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.




^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-08-12  1:34 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-09  2:11 WIP: Expand directory handle cache to also cache non-root directories Ronnie Sahlberg
2022-08-09  2:11 ` [PATCH 1/9] cifs: Move cached-dir functions into a separate file Ronnie Sahlberg
2022-08-11  2:53   ` Steve French
2022-08-11  3:08     ` Steve French
2022-08-11 13:03   ` Paulo Alcantara
2022-08-09  2:11 ` [PATCH 2/9] cifs: Do not use tcon->cfid directly, use the cfid we get from open_cached_dir Ronnie Sahlberg
2022-08-09  4:22   ` Steve French
2022-08-11 13:03   ` Paulo Alcantara
2022-08-09  2:11 ` [PATCH 3/9] cifs: Add constructor/destructors for tcon->cfid Ronnie Sahlberg
2022-08-11 13:15   ` Paulo Alcantara
2022-08-12  0:14     ` Steve French
2022-08-09  2:11 ` [PATCH 4/9] cifs: Make tcon contain a wrapper structure cached_fids instead of cached_fid Ronnie Sahlberg
2022-08-11 13:16   ` Paulo Alcantara
2022-08-09  2:11 ` [PATCH 5/9] cifs: Do not access tcon->cfids->cfid directly from is_path_accessible Ronnie Sahlberg
2022-08-11 13:20   ` Paulo Alcantara
2022-08-12  0:56     ` Steve French
2022-08-12  0:57       ` Steve French
2022-08-12  1:26         ` Steve French
2022-08-12  1:34           ` Steve French
2022-08-09  2:11 ` [PATCH 6/9] cifs: cifs: handlecache, only track the dentry for the root handle Ronnie Sahlberg
2022-08-11 13:34   ` Paulo Alcantara
2022-08-09  2:11 ` [PATCH 7/9] cifs: store a pointer to a fid in the cfid structure instead of the struct Ronnie Sahlberg
2022-08-11 13:37   ` Paulo Alcantara
2022-08-09  2:11 ` [PATCH 8/9] cifs: don't unlock cifs_tcp_ses_lock in cached_dir_lease_break() Ronnie Sahlberg
2022-08-11 13:38   ` Paulo Alcantara
2022-08-11 15:27     ` Steve French
2022-08-09  2:11 ` [PATCH 9/9] cifs: start caching all directories we open and get a lease for Ronnie Sahlberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox