lkml.org 
[lkml]   [2020]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] generic_file_buffered_read() refactoring & optimization
Date
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

\
 
 \ /
  Last update: 2020-06-10 02:11    [W:0.134 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site