From: Wu Fengguang - Enlarge VM_MAX_READAHEAD to 1024 if new read-ahead code is compiled in. This value is no longer tightly coupled with the thrashing problem, therefore constrained by it. The adaptive read-ahead logic merely takes it as an upper bound, and will not stick to it under memory pressure. - Slightly enlarge minimal/initial read-ahead size on big memory systems. Memory bounty systems are less likely to suffer from thrashing on small read-ahead sizes. A bigger initial value helps the ra_size scaling up progress. Signed-off-by: Wu Fengguang Signed-off-by: Andrew Morton --- include/linux/mm.h | 5 +++++ 1 file changed, 5 insertions(+) diff -puN include/linux/mm.h~readahead-min-max-sizes include/linux/mm.h --- a/include/linux/mm.h~readahead-min-max-sizes +++ a/include/linux/mm.h @@ -1103,8 +1103,13 @@ extern struct page *filemap_fault(struct int write_one_page(struct page *page, int wait); /* readahead.c */ +#ifdef CONFIG_ADAPTIVE_READAHEAD +#define VM_MAX_READAHEAD 1024 /* kbytes */ +#define VM_MIN_READAHEAD 32 /* kbytes (includes current page) */ +#else #define VM_MAX_READAHEAD 128 /* kbytes */ #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ +#endif #define VM_MAX_CACHE_HIT 256 /* max pages in a row in cache before * turning readahead off */ _