• Fengguang Wu's avatar
    readahead: add look-ahead support to __do_page_cache_readahead() · 46fc3e7b
    Fengguang Wu authored
    Add look-ahead support to __do_page_cache_readahead().
    
    It works by
    	- mark the Nth backwards page with PG_readahead,
    	(which instructs the page's first reader to invoke readahead)
    	- and only do the marking for newly allocated pages.
    	(to prevent blindly doing readahead on already cached pages)
    
    Look-ahead is a technique to achieve I/O pipelining:
    
    While the application is working through a chunk of cached pages, the kernel
    reads-ahead the next chunk of pages _before_ time of need.  It effectively
    hides low level I/O latencies to high level applications.
    Signed-off-by: default avatarFengguang Wu <wfg@mail.ustc.edu.cn>
    Cc: Steven Pratt <slpratt@austin.ibm.com>
    Cc: Ram Pai <linuxram@us.ibm.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    46fc3e7b
readahead.c 17.1 KB