lkml.org 
[lkml]   [2001]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: page_launder() bug
    Date
    In article <Pine.A41.4.31.0105062307290.59664-100000@pandora.inf.elte.hu>,
    BERECZ Szabolcs <szabi@inf.elte.hu> wrote:
    >
    >there is a bug in page_launder introduced with kernel 2.4.3-ac12.

    Yes.

    The whole "dead_swap_page" optimization in the -ac tree is apparentrly
    completely bogus. It caches a value that is not valid: you cannot
    reliably look at whether the page has buffers etc without holding the
    page locked.

    So calculating "dead_swap_page" without locking the page first is a sure
    way to cause trouble.

    I can see why the bug was introduced: standard kernels _optimistically_
    test whether the condition might be true before they lock the page, and
    decide to not even try to touch pages that look like they are probably
    going to be considered active.

    But it is important to re-calculate the deadness after getting the lock.
    Before, it was just an informed guess. After the lock, it is knowledge.
    And you can use informed guesses for heuristics, but you must _not_ use
    them for any serious decisions.

    Alan, please revert.

    Linus
    -
    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: 2005-03-22 12:52    [W:6.446 / U:2.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site