From: Jens Axboe <axboe@kernel.dk>
To: Kent Overstreet <kent.overstreet@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
fsdevel <linux-fsdevel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Kent Overstreet <kent.overstreet@gmail.com>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig
Date: Tue, 20 Oct 2020 08:47:39 -0600 [thread overview]
Message-ID: <0da8d117-04ca-c236-dd3f-a6abbaf4097e@kernel.dk> (raw)
In-Reply-To: <20201017201055.2216969-3-kent.overstreet@gmail.com>
On Sat, Oct 17, 2020 at 2:11 PM Kent Overstreet <kent.overstreet@gmail.com> wrote:
>
> Convert generic_file_buffered_read() to get pages to read from in
> batches, and then copy data to userspace from many pages at once - in
> particular, we now don't touch any cachelines that might be contended
> while we're in the loop to copy data to userspace.
>
> This is is a performance improvement on workloads that do buffered reads
> with large blocksizes, and a very large performance improvement if that
> file is also being accessed concurrently by different threads.
>
> On smaller reads (512 bytes), there's a very small performance
> improvement (1%, within the margin of error).
I ran this through my buffered testing, and no ill effects observed. It
also provides a nice boost on the read side for a mixed read/write
verification workload I have.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
--
Jens Axboe
next prev parent reply other threads:[~2020-10-20 14:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-17 20:10 [PATCH 0/2] generic_file_buffered_read() refactoring, perf improvements Kent Overstreet
2020-10-17 20:10 ` [PATCH 1/2] fs: Break generic_file_buffered_read up into multiple functions Kent Overstreet
2020-10-20 14:44 ` Jens Axboe
2020-10-17 20:10 ` [PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig Kent Overstreet
2020-10-20 14:47 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-06-10 0:10 [PATCH 0/2] generic_file_buffered_read() refactoring & optimization Kent Overstreet
2020-06-10 0:10 ` [PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig Kent Overstreet
2020-06-10 0:47 ` Matthew Wilcox
2020-06-10 1:08 ` Kent Overstreet
2020-06-10 1:38 ` Matthew Wilcox
2020-06-10 1:46 ` Kent Overstreet
2018-08-15 23:26 [PATCH 0/2] generic_file_buffered_read improvements Kent Overstreet
2018-08-15 23:26 ` [PATCH 2/2] fs: generic_file_buffered_read() now uses find_get_pages_contig Kent Overstreet
2018-08-16 14:56 ` kbuild test robot
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=0da8d117-04ca-c236-dd3f-a6abbaf4097e@kernel.dk \
--to=axboe@kernel.dk \
--cc=akpm@linux-foundation.org \
--cc=kent.overstreet@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).