The patch titled readahead: backward prefetching method has been removed from the -mm tree. Its filename was readahead-backward-prefetching-method.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ Subject: readahead: backward prefetching method From: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> Readahead policy for reading backward. Signed-off-by: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/readahead.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff -puN mm/readahead.c~readahead-backward-prefetching-method mm/readahead.c --- a/mm/readahead.c~readahead-backward-prefetching-method +++ a/mm/readahead.c @@ -1494,6 +1494,52 @@ initial_readahead(struct address_space * return ra_submit(ra, mapping, filp); } +/* + * Backward prefetching. + * + * No look-ahead and thrashing safety guard: should be unnecessary. + * + * Important for certain scientific arenas(i.e. structural analysis). + */ +static int +try_backward_prefetching(struct file_ra_state *ra, pgoff_t offset, + unsigned long size, unsigned long ra_max) +{ + pgoff_t prev = ra->prev_index; + + /* Reading backward? */ + if (offset >= prev) + return 0; + + /* Close enough? */ + size += readahead_hit_rate; + if (offset + 2 * size <= prev) + return 0; + + if (ra_class_new(ra) == RA_CLASS_BACKWARD && ra_has_index(ra, prev)) { + prev = ra->la_index; + size += 2 * ra_readahead_size(ra); + } else + size *= 2; + + if (size > ra_max) + size = ra_max; + if (size > prev) + size = prev; + + /* The readahead-request covers the read-request? */ + if (offset < prev - size) + return 0; + + offset = prev - size; + + ra_set_class(ra, RA_CLASS_BACKWARD); + ra_set_index(ra, offset, offset); + ra_set_size(ra, size, 0); + + return 1; +} + #endif /* CONFIG_ADAPTIVE_READAHEAD */ /* _ Patches currently in -mm which might be from wfg@xxxxxxxxxxxxxxxx are origin.patch readahead-backward-prefetching-method.patch readahead-thrashing-recovery-method.patch readahead-thrashing-recovery-method-check-unbalanced-aging.patch readahead-thrashing-recovery-method-refill-holes.patch readahead-call-scheme.patch readahead-call-scheme-cleanup.patch readahead-call-scheme-catch-thrashing-on-lookahead-time.patch readahead-call-scheme-doc-fixes-for-readahead.patch readahead-laptop-mode.patch readahead-loop-case.patch readahead-nfsd-case.patch readahead-remove-parameter-ra_max-from-thrashing_recovery_readahead.patch readahead-remove-parameter-ra_max-from-adjust_rala.patch readahead-state-based-method-protect-against-tiny-size.patch readahead-rename-state_based_readahead-to-clock_based_readahead.patch readahead-account-i-o-block-times-for-stock-readahead.patch readahead-rescue_pages-updates.patch readahead-remove-noaction-shrink-events.patch readahead-remove-size-limit-on-read_ahead_kb.patch readahead-remove-size-limit-of-max_sectors_kb-on-read_ahead_kb.patch readahead-partial-sendfile-fix.patch readahead-turn-on-by-default.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