linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shyam Prasad N <nspmangalore@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Steve French <smfrench@gmail.com>,
	CIFS <linux-cifs@vger.kernel.org>,
	Jeff Layton <jlayton@redhat.com>,
	David Howells <dhowells@redhat.com>
Subject: Re: [PATCH] smb3: add rasize mount parameter to improve performance of readahead
Date: Fri, 30 Apr 2021 16:19:27 +0530	[thread overview]
Message-ID: <CANT5p=rHgmLdHJm_y3CCpb=KoEbnJApce2wx4hORY2CwHP2NbQ@mail.gmail.com> (raw)
In-Reply-To: <20210426115457.GJ235567@casper.infradead.org>

Hi Matthew,

Sorry for the late reply. Still catching up on my emails.
No. I did not see read-aheads ramping up with random reads, so I feel
we're okay there with or without this patch.

Although ideally, I feel that we (cifs.ko) should be able to read in
larger granular "chunks" even for small reads, in expectation that
surrounding offsets will be read soon.
This is especially useful if the read comes from something like a loop
device backed file.

Is there a way for a filesystem to indicate to the mm/readahead layer
to read in chunks of N bytes? Even for random workloads? Even if the
actual read is much smaller?
I did some code reading of mm/readahead.c and understand that if the
file is opened with fadvise flag of FADV_RANDOM, there's some logic to
read in chunks. But that seems to work only if the actual read size is
bigger.

Regards,
Shyam

On Mon, Apr 26, 2021 at 5:25 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Mon, Apr 26, 2021 at 10:22:27AM +0530, Shyam Prasad N wrote:
> > Agree with this. Was experimenting on the similar lines on Friday.
> > Does show good improvements with sequential workload.
> > For random read/write workload, the user can use the default value.
>
> For a random access workload, Linux's readahead shouldn't kick in.
> Do you see a slowdown when using this patch with a random I/O workload?
>


-- 
Regards,
Shyam

  parent reply	other threads:[~2021-04-30 10:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 19:27 [PATCH] smb3: add rasize mount parameter to improve performance of readahead Steve French
2021-04-24 20:08 ` Steve French
2021-04-25  2:09 ` Matthew Wilcox
2021-04-25  2:36   ` Steve French
2021-04-25 16:50     ` Steve French
2021-04-26  4:52       ` Shyam Prasad N
2021-04-26 11:54         ` Matthew Wilcox
2021-04-27  2:23           ` Steve French
2021-04-30 10:49           ` Shyam Prasad N [this message]
2021-04-30 11:59             ` Matthew Wilcox
2021-04-30 12:53               ` Shyam Prasad N
2021-04-30 19:22               ` Steve French
2021-05-01 18:35                 ` Matthew Wilcox
2021-05-01 18:47                   ` Steve French
2021-05-01 18:50                     ` 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='CANT5p=rHgmLdHJm_y3CCpb=KoEbnJApce2wx4hORY2CwHP2NbQ@mail.gmail.com' \
    --to=nspmangalore@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=smfrench@gmail.com \
    --cc=willy@infradead.org \
    /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).