[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200610001036.3904844-1-kent.overstreet@gmail.com>
Date: Tue, 9 Jun 2020 20:10:34 -0400
From: Kent Overstreet <kent.overstreet@...il.com>
To: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
viro@...iv.linux.org.uk, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org
Cc: Kent Overstreet <kent.overstreet@...il.com>
Subject: [PATCH 0/2] generic_file_buffered_read() refactoring & optimization
This is a small patch series that's been in the bcachefs tree for awhile.
In the buffered read path, we look up a page in the page cache, then copy from
that page in a loop - i.e. mixing the data copies in between looking up each
individual page. When we're doing large reads from the page cache, this is some
pretty major overhead.
This just reworks generic_file_buffered_read() to use find_get_pages_contig()
and work on an array of pages. It's a pretty significant performance
improvement for large buffered reads, and doesn't regress performance on single
page reads.
As a bonus, generic_file_buffered_read() gets broken up into multiple functions
that are _somewhat_ easier to follow.
Kent Overstreet (2):
fs: Break generic_file_buffered_read up into multiple functions
fs: generic_file_buffered_read() now uses find_get_pages_contig
mm/filemap.c | 486 +++++++++++++++++++++++++++++----------------------
1 file changed, 273 insertions(+), 213 deletions(-)
--
2.27.0
Powered by blists - more mailing lists