The patch titled readahead: context based method - slow start has been added to the -mm tree. Its filename is readahead-context-based-method-slow-start.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: readahead: context based method - slow start From: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> The context method will lead to noticable overhead(readahead miss) on very sparse random reads. Having the readahead window to start slowly makes it much better. But still startup quick if the user prefers sparse readahead. Benchmarks of reading randomly 100,000 pages on a 1000,000 pages _sparse_ file: ARA before patch ARA STOCK ================ ================ ================ real 2.779s 2.782s 2.552s 2.606s 2.477s 2.521s user 1.120s 1.184s 1.133s 1.155s 1.097s 1.159s sys 1.248s 1.208s 1.093s 1.086s 1.079s 1.064s Signed-off-by: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- mm/readahead.c | 6 ++++++ 1 file changed, 6 insertions(+) diff -puN mm/readahead.c~readahead-context-based-method-slow-start mm/readahead.c --- a/mm/readahead.c~readahead-context-based-method-slow-start +++ a/mm/readahead.c @@ -1439,6 +1439,12 @@ try_context_based_readahead(struct addre return -1; } else if (prev_page || probe_page(mapping, index - 1)) { ra_index = index; + /* + * Slow start of readahead window. + * It helps avoid most readahead miss on sparse random reads. + */ + if (readahead_hit_rate == 1) + ra_min = 1; } else if (readahead_hit_rate > 1) { ra_index = find_segtail_backward(mapping, index, readahead_hit_rate + ra_min); _ Patches currently in -mm which might be from wfg@xxxxxxxxxxxxxxxx are origin.patch readahead-kconfig-options.patch readahead-kconfig-option-readahead_allow_overheads.patch radixtree-introduce-radix_tree_scan_hole.patch mm-introduce-probe_page.patch mm-introduce-pg_readahead.patch readahead-add-look-ahead-support-to-__do_page_cache_readahead.patch readahead-delay-page-release-in-do_generic_mapping_read.patch readahead-insert-cond_resched-calls.patch readahead-minmax_ra_pages.patch readahead-events-accounting.patch readahead-rescue_pages.patch readahead-sysctl-parameters.patch readahead-sysctl-parameters-fix.patch readahead-min-max-sizes.patch readahead-state-based-method-aging-accounting.patch readahead-state-based-method-routines.patch readahead-state-based-method-routines-no-ra_flag_eof-on-single-page-file.patch readahead-state-based-method.patch readahead-state-based-method-readahead-state-based-method-stand-alone-size-limit-code.patch readahead-state-based-method-aging-accounting-readahead-kconfig-option-readahead_smooth_aging.patch readahead-context-based-method.patch readahead-context-based-method-apply-stream_shift-size-limits-to-contexta-method.patch readahead-context-based-method-fix-remain-counting.patch readahead-context-based-method-slow-start.patch readahead-initial-method-guiding-sizes.patch readahead-initial-method-guiding-sizes-aggressive-initial-sizes.patch readahead-initial-method-thrashing-guard-size.patch readahead-initial-method-expected-read-size.patch readahead-initial-method-user-recommended-size.patch readahead-initial-method.patch readahead-backward-prefetching-method.patch readahead-backward-prefetching-method-add-use-case-comment.patch readahead-seeking-reads-method.patch readahead-thrashing-recovery-method.patch readahead-call-scheme.patch readahead-call-scheme-fix-fastcall.patch readahead-call-scheme-no-fastcall-for-readahead_cache_hit.patch readahead-call-scheme-no-fastcall-for-readahead_cache_hit-kconfig-option-readahead_hit_feedback.patch readahead-laptop-mode.patch readahead-loop-case.patch readahead-nfsd-case.patch readahead-turn-on-by-default.patch readahead-debug-radix-tree-new-functions.patch readahead-debug-traces-showing-accessed-file-names.patch readahead-debug-traces-showing-read-patterns.patch readahead-remove-size-limit-on-read_ahead_kb.patch readahead-backward-prefetching-method-fix.patch readahead-remove-the-size-limit-of-max_sectors_kb-on-read_ahead_kb.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html