• F
    readahead: pass real splice size · d8983910
    Fengguang Wu 提交于
    Pass real splice size to page_cache_readahead_ondemand().
    
    The splice code works in chunks of 16 pages internally.  The readahead code
    should be told of the overall splice size, instead of the internal chunk size.
     Otherwize bad things may happen.  Imagine some 17-page random splice reads.
    The code before this patch will result in two readahead calls: readahead(16);
    readahead(1); That leads to one 16-page I/O and one 32-page I/O: one extra I/O
    and 31 readahead miss pages.
    Signed-off-by: NFengguang Wu <wfg@mail.ustc.edu.cn>
    Cc: Jens Axboe <jens.axboe@oracle.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    d8983910
splice.c 39.9 KB