diff --git a/include/linux/mm.h b/include/linux/mm.h index 6faba4f28ab4..646648e4d2db 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1989,7 +1989,7 @@ int write_one_page(struct page *page, int wait); void task_dirty_inc(struct task_struct *tsk); /* readahead.c */ -#define VM_MAX_READAHEAD 512 /* kbytes */ +#define VM_MAX_READAHEAD CONFIG_VM_MAX_READAHEAD /* kbytes */ #define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */ int force_page_cache_readahead(struct address_space *mapping, struct file *filp, diff --git a/mm/Kconfig b/mm/Kconfig index 1105a5b79b1e..274a315e0684 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -743,3 +743,11 @@ config PROCESS_RECLAIM (addr, addr + size-bytes) of the process. Any other vaule is ignored. + +config VM_MAX_READAHEAD + int "default max readahead window size" + default 128 + help + This sets the VM_MAX_READAHEAD value to allow the readahead window + to grow to a maximum size of configured. This will benefit sequential + read throughput and thus early boot performance.