All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH 0/3] cifs: cache directory content for shroot
Date: Fri, 2 Oct 2020 00:07:32 -0500	[thread overview]
Message-ID: <CAH2r5mvu0MkosfCnCp4jO1=aYVrOaigwoiV09zmTsZtqGL9nVw@mail.gmail.com> (raw)
In-Reply-To: <20201001205026.8808-1-lsahlber@redhat.com>

My initial test of this was to Windows 10, doing ls of the root directory.

During mount as expected I see the initial compounded smb3.1.1
create/query(file_all_info) work and get a directory lease (read
lease) on the root directory

Then doing the ls
I see the expected ls of the root directory query dir return
successfully, but it is a compounded open/query-dir (no lease
requested) not a query dir using the already open root file handle.
We should find a way to allow it to use the root file handle if
possible although perhaps less important when the caching code is
fully working as it will only be requested once.

The next ls though does an open/query but then does stat of all the
files (which is bad, lots of compounded open/query-info/close).  Then
the next ls will do open/query-dir

So the patch set is promising but currently isn't caching the root
directory contents in a way that is recognized by the subsequent ls
commands.   I will try to look at this more this weekend - but let me
know if updated version of the patchset - it will be very, very useful
when we can get this working - very exciting.

On Thu, Oct 1, 2020 at 3:50 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> Steve, List
>
> See initial implementation of a mechanism to cache the directory entries for
> a shared cache handle (shroot).
> We cache all the entries during the initial readdir() scan, using the context
> from the vfs layer as the key to handle if there are multiple concurrent readir() scans
> of the same directory.
> Then if/when we have successfully cached the entire direcotry we will server any
> subsequent readdir() from out of cache, avoinding making any query direcotry calls to the server.
>
> As with all of shroot, the cache is kept until the direcotry lease is broken.
>
>
> The first two patches are small and just a preparation for the third patch. They go as separate
> patches to make review easier.
> The third patch adds the actual meat of the dirent caching .
>
>
> For now this might not be too exciting because the only cache the root handle.
> I hope in the future we will expand the directory caching to handle any/many direcotries.
>


-- 
Thanks,

Steve

  parent reply	other threads:[~2020-10-02  5:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 20:50 [PATCH 0/3] cifs: cache directory content for shroot Ronnie Sahlberg
2020-10-01 20:50 ` [PATCH 1/3] cifs: return cached_fid from open_shroot Ronnie Sahlberg
2020-10-01 20:50 ` [PATCH 2/3] cifs: compute full_path already in cifs_readdir() Ronnie Sahlberg
2020-10-01 20:50 ` [PATCH 3/3] cifs: cache the directory content for shroot Ronnie Sahlberg
2020-10-01 22:24   ` Steve French
2020-10-02 15:29   ` Aurélien Aptel
2020-10-04 23:19     ` ronnie sahlberg
     [not found]       ` <CAH2r5mvijc=-JdmPMUxAUqmJKy0-x3o72NsHx+QcByBnggGXMA@mail.gmail.com>
2020-10-05  0:20         ` ronnie sahlberg
2020-10-20 10:28   ` Shyam Prasad N
2020-10-02  5:07 ` Steve French [this message]
2020-10-02  8:04   ` [PATCH 0/3] cifs: cache " ronnie sahlberg
2020-10-02  8:07     ` ronnie sahlberg
2020-10-02 14:13       ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2r5mvu0MkosfCnCp4jO1=aYVrOaigwoiV09zmTsZtqGL9nVw@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.