linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Rohith Surabattula <rohiths.msft@gmail.com>
Cc: dhowells@redhat.com, smfrench@gmail.com, nspmangalore@gmail.com,
	jlayton@kernel.org, linux-cifs@vger.kernel.org,
	linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC PATCH 7/7] cifs: Use netfslib to handle reads
Date: Mon, 14 Feb 2022 16:33:23 +0000	[thread overview]
Message-ID: <3013921.1644856403@warthog.procyon.org.uk> (raw)
In-Reply-To: <CACdtm0YtxAUMet_PSxpg69OR9_TQbMQOzU5Kbm_5YDe_C7Nb-w@mail.gmail.com>

Rohith Surabattula <rohiths.msft@gmail.com> wrote:

> I have tested netfs integration with fsc mount option enabled. But, I
> observed function "netfs_cache_prepare_read" always returns
> "NETFS_DOWNLOAD_FROM_SERVER" because cres->ops(i.e cachefiles
> operations) is not set.

I see it download from the server and write to the cache:

	# cat /proc/fs/fscache/stats 
	...
	IO     : rd=0 wr=4     <---- no reads, four writes made
	RdHelp : DR=0 RA=4 RP=0 WB=0 WBZ=0 rr=0 sr=0
	RdHelp : ZR=0 sh=0 sk=0
	RdHelp : DL=4 ds=4 df=0 di=0
	RdHelp : RD=0 rs=0 rf=0
	RdHelp : WR=4 ws=4 wf=0

Turning on the cachefiles_vol_coherency tracepoint, I see:

     kworker/2:2-1040    [002] .....   585.499799: cachefiles_vol_coherency: V=00000003 VOL BAD cmp  B=480004
     kworker/2:2-1040    [002] .....   585.499872: cachefiles_vol_coherency: V=00000003 VOL SET ok   B=480005

every time I unmount and mount again.  One of the fields is different each
time.

Using the netfs tracepoints, I can see the download being made from the server
and then the subsequent write to the cache:

          md5sum-4689    [003] .....   887.382290: netfs_read: R=00000005 READAHEAD c=0000004e ni=86 s=0 20000
          md5sum-4689    [003] .....   887.383076: netfs_read: R=00000005 EXPANDED  c=0000004e ni=86 s=0 400000
          md5sum-4689    [003] .....   887.383252: netfs_sreq: R=00000005[0] PREP  DOWN f=01 s=0 0/400000 e=0
          md5sum-4689    [003] .....   887.383252: netfs_sreq: R=00000005[0] SUBMT DOWN f=01 s=0 0/400000 e=0
           cifsd-4687    [002] .....   887.394926: netfs_sreq: R=00000005[0] TERM  DOWN f=03 s=0 400000/400000 e=0
           cifsd-4687    [002] .....   887.394928: netfs_rreq: R=00000005 ASSESS f=22
           cifsd-4687    [002] .....   887.394928: netfs_rreq: R=00000005 UNLOCK f=22
    kworker/u8:4-776     [000] .....   887.395000: netfs_rreq: R=00000005 WRITE  f=02
    kworker/u8:4-776     [000] .....   887.395005: netfs_sreq: R=00000005[0] WRITE DOWN f=03 s=0 400000/400000 e=0
     kworker/3:2-1001    [003] .....   887.627881: netfs_sreq: R=00000005[0] WTERM DOWN f=03 s=0 400000/400000 e=0
     kworker/3:2-1001    [003] .....   887.628163: netfs_rreq: R=00000005 DONE   f=02
     kworker/3:2-1001    [003] .....   887.628165: netfs_sreq: R=00000005[0] FREE  DOWN f=03 s=0 400000/400000 e=0
    kworker/u8:4-776     [000] .....   887.628216: netfs_rreq: R=00000005 FREE   f=02

Can you mount a cifs share with "-o fsc", read a file and then look in
/proc/fs/fscache/cookies and /proc/fs/fscache/stats for me?

David


  parent reply	other threads:[~2022-02-14 16:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 13:57 [RFC][RFC PATCH 0/7] cifs: In-progress conversion to use iov_iters and netfslib David Howells
2022-01-25 13:57 ` [RFC PATCH 1/7] cifs: Transition from ->readpages() to ->readahead() David Howells
2022-01-25 14:20   ` Matthew Wilcox
2022-01-25 14:57   ` David Howells
2022-01-25 13:57 ` [RFC PATCH 2/7] cifs: Miscellaneous bits David Howells
2022-01-25 13:57 ` [RFC PATCH 3/7] cifs: Change the I/O paths to use an iterator rather than a page list David Howells
2022-01-31  5:06   ` Rohith Surabattula
2022-01-31  5:48     ` Shyam Prasad N
2022-02-14 16:06   ` David Howells
2022-01-25 13:58 ` [RFC PATCH 4/7] cifs: Make cifs_writepages() hand an iterator down David Howells
2022-01-25 13:58 ` [RFC PATCH 5/7] cifs: Make cifs_readahead() pass " David Howells
2022-01-25 13:58 ` [RFC PATCH 6/7] cifs: Get direct I/O and unbuffered I/O working with iterators David Howells
2022-01-25 13:59 ` [RFC PATCH 7/7] cifs: Use netfslib to handle reads David Howells
2022-02-08  5:59   ` Rohith Surabattula
2022-02-14 16:33   ` David Howells [this message]
2022-02-28 14:14     ` Rohith Surabattula
2022-02-28 14:28     ` David Howells
2022-03-01  7:21       ` Rohith Surabattula
2022-03-01  9:39       ` David Howells
2022-03-02 13:51         ` Rohith Surabattula

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=3013921.1644856403@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=rohiths.msft@gmail.com \
    --cc=smfrench@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).