lkml.org 
[lkml]   [2007]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 7/8] readahead: call scheme: fix thrashed unaligned read
    When doing unaligned/subpages sequential reads, and thrashing happened,
    it is possible that (offset == prev_page),
    besides the normal (offset == prev_page + 1).

    We do not have such problem for the state based method.

    Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
    ---
    mm/readahead.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- linux-2.6.20-rc4-mm1.orig/mm/readahead.c
    +++ linux-2.6.20-rc4-mm1/mm/readahead.c
    @@ -1618,7 +1618,7 @@ page_cache_readahead_adaptive(struct add
    /*
    * Recover from possible thrashing.
    */
    - if (!page && offset == ra->prev_page + 1 && ra_has_index(ra, offset))
    + if (!page && offset - ra->prev_page <= 1 && ra_has_index(ra, offset))
    return thrashing_recovery_readahead(mapping, filp, ra,
    offset, ra_max);

    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-01-27 09:29    [W:0.022 / U:176.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site