Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Rohith Surabattula <rohiths.msft@gmail.com>
Cc: dhowells@redhat.com, Steve French <smfrench@gmail.com>,
	Shyam Prasad N <nspmangalore@gmail.com>,
	ronnie sahlberg <ronniesahlberg@gmail.com>,
	Paulo Alcantara <pc@cjr.nz>,
	jlayton@kernel.org, linux-cifs@vger.kernel.org
Subject: cifs conversion to netfslib
Date: Fri, 11 Mar 2022 08:19:33 +0000	[thread overview]
Message-ID: <2314914.1646986773@warthog.procyon.org.uk> (raw)


Hi Rohith,

Take a look at the patches at the top of my cifs-experimental branch.  I put
in a ->clamp_length() method and used that to chop up read requests into
subrequests according to credits and rsize rather than trying to limit the
size of a read in ->issue_read().  It behaves a lot better now.  I see the VM
creating 8M requests that then get broken up into pairs of 4M read RPCs that
then take place in parallel.

I've taken the idea of allowing the netfs to propose larger allocations for
the request and subrequest structs and, in effect, merged the cifs_readdata
struct with the netfs_io_subrequest struct reducing the amount of overhead a
bit.  I moved the cifsFileInfo field out from the subrequest to a wrapper for
the request struct, so that it's carried for all the subreqs in common.

Possibly some other readdata fields could be eliminated too as being
superfluous to the fields in the netfs_io_subrequest struct.  offset,
got_bytes, bytes and result for example.

There are a couple of problems with splice write, though, at least one of
which is probably due to the iteratorisation.  Firstly, xfstests now gets as
far as generic/013 and then gets to a point where one of the threads is just
sitting there sending the same splice write over and over again and getting a
zero result back.  Running splice by hand, however, shows no problem and
because it's in fsstress, I think, it's really hard to work out how it gets to
this point:-/.

The other issue is that if I run splice to an empty file, it works; running
another splice to the same file will result in the server giving
STATUS_ACCESS_DENIED when cifs_write_begin() tries to read from the file:

    7 0.009485249  192.168.6.2 → 192.168.6.1  SMB2 183 Read Request Len:65536 Off:0 File: x
    8 0.009674245  192.168.6.1 → 192.168.6.2  SMB2 143 Read Response, Error: STATUS_ACCESS_DENIED

Actually - that might be because the file is only 65536 bytes long because the
first splice finished short.

David


             reply	other threads:[~2022-03-11  8:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11  8:19 David Howells [this message]
2022-03-11  8:25 ` cifs conversion to netfslib David Howells
2022-03-15  3:50   ` Rohith Surabattula
2022-03-15  9:54     ` Rohith Surabattula
2022-03-17  0:07       ` David Howells
2022-03-17 16:16         ` David Howells
2022-03-18  0:21         ` David Howells
2022-03-18  2:52           ` Steve French
2022-03-21 10:19             ` Rohith Surabattula
2022-03-21 17:18               ` David Howells

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=2314914.1646986773@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.com \
    --cc=pc@cjr.nz \
    --cc=rohiths.msft@gmail.com \
    --cc=ronniesahlberg@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