Skip to content

512K readahead size with thrashing safe readahead v2

Wu Fengguang linux-fsdevel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 20 repliesIn review

Changes since v1 from the cover letter

- update mmap read-around heuristics (Thanks to Nick Piggin)
- radix_tree_lookup_leaf_node() for the pagecache based mmap read-around
- use __print_symbolic() to show readahead pattern names (Thanks to Steven Rostedt)
- scale down readahead size proportional to system memory (Thanks to Matt Mackall)
- add readahead size kernel parameter (by Nikanth Karthikesan)
- add comments from Christian Ehrhardt

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15readahead: limit readahead size for small devicesblock/genhd.c+24 -01 reply
2/15readahead: retain inactive lru pages to be accessed soonmm/readahead.c+44 -02 replies
3/15readahead: bump up the default readahead sizeinclude/linux/mm.h+2 -21 reply
4/15readahead: make default readahead size a kernel parameterDocumentation/kernel-parameters.txt block/blk-core.c fs/fuse/inode.c +1 more+28 -31 reply
5/15readahead: limit readahead size for small memory systemsmm/readahead.c+26 -07 replies
6/15readahead: replace ra->mmap_miss with ra->ra_flagsinclude/linux/fs.h mm/filemap.c+31 -61 reply
7/15readahead: thrashing safe context readaheadinclude/linux/fs.h mm/readahead.c+88 -681 reply
8/15readahead: record readahead patternsinclude/linux/fs.h include/linux/mm.h mm/filemap.c +1 more+55 -71 reply
9/15readahead: add tracing eventinclude/trace/events/readahead.h mm/readahead.c+89 -01 reply
10/15readahead: add /debug/readahead/statsmm/Kconfig mm/readahead.c+198 -21 reply
11/15readahead: dont do start-of-file readahead after lseek()fs/read_write.c include/linux/fs.h mm/readahead.c+9 -01 reply
12/15radixtree: introduce radix_tree_lookup_leaf_node()include/linux/radix-tree.h lib/radix-tree.c+24 -51 reply
13/15radixtree: speed up the search for holelib/radix-tree.c+56 -111 reply
14/15readahead: reduce MMAP_LOTSAMISS for mmap read-aroundmm/filemap.c+1 -11 reply
15/15readahead: pagecache context based mmap read-aroundmm/filemap.c+10 -41 reply

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchJens AxboeVivek GoyalLinus TorvaldsChristian EhrhardtRik van Riel
1/15A-b T-b T-b A-b
2/15A-b
3/15T-b T-b A-b A-b
4/15A-b
5/15A-b A-b A-b
6/15A-b
7/15A-b
8/15A-b
9/15A-b
10/15A-b
11/15A-b A-b
12/15A-b
13/15A-b
14/15A-b
15/15A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 00/15] 512K readahead size with thrashing safe readahead v2

Andrew,

This enlarges the default readahead size from 128K to 512K. To avoid possible regressions, also do
- scale down readahead size on small device and small memory
- thrashing safe context readahead
- add readahead tracing/stats support to help expose possible problems

Besides, the patchset also includes several algorithm updates:
- no start-of-file readahead after lseek
- faster radix_tree_next_hole()/radix_tree_prev_hole()
- pagecache context based mmap read-around

Changes since v1:
- update mmap read-around heuristics (Thanks to Nick Piggin)
- radix_tree_lookup_leaf_node() for the pagecache based mmap read-around
- use __print_symbolic() to show readahead pattern names (Thanks to Steven Rostedt)
- scale down readahead size proportional to system memory (Thanks to Matt Mackall)
- add readahead size kernel parameter (by Nikanth Karthikesan)
- add comments from Christian Ehrhardt

Changes since RFC:
- move the lenthy intro text to individual patch changelogs
- treat get_capacity()==0 as uninitilized value (Thanks to Vivek Goyal)
- increase readahead size limit for small devices (Thanks to Jens Axboe)
- add fio test results by Vivek Goyal

[PATCH 01/15] readahead: limit readahead size for small devices [PATCH 02/15] readahead: retain inactive lru pages to be accessed soon [PATCH 03/15] readahead: bump up the default readahead size [PATCH 04/15] readahead: make default readahead size a kernel parameter [PATCH 05/15] readahead: limit readahead size for small memory systems [PATCH 06/15] readahead: replace ra->mmap_miss with ra->ra_flags [PATCH 07/15] readahead: thrashing safe context readahead [PATCH 08/15] readahead: record readahead patterns
[PATCH 09/15] readahead: add tracing event
[PATCH 10/15] readahead: add /debug/readahead/stats
[PATCH 11/15] readahead: dont do start-of-file readahead after lseek() [PATCH 12/15] radixtree: introduce radix_tree_lookup_leaf_node() [PATCH 13/15] radixtree: speed up the search for hole
[PATCH 14/15] readahead: reduce MMAP_LOTSAMISS for mmap read-around [PATCH 15/15] readahead: pagecache context based mmap read-around

 Documentation/kernel-parameters.txt |    4 
 block/blk-core.c                    |    3 
 block/genhd.c                       |   24 +
 fs/fuse/inode.c                     |    2 
 fs/read_write.c                     |    3 
 include/linux/fs.h                  |   64 +++
 include/linux/mm.h                  |    8 
 include/linux/radix-tree.h          |    2 
 include/trace/events/readahead.h    |   78 ++++
 lib/radix-tree.c                    |   94 ++++-
 mm/Kconfig                          |   13 
 mm/filemap.c                        |   30 +
 mm/readahead.c                      |  459 ++++++++++++++++++++++----
 13 files changed, 680 insertions(+), 104 deletions(-)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>