• L
    Fix memory ordering bug in page reclaim · 3d80636a
    Linus Torvalds 提交于
    As noticed by Nick Piggin, we need to make sure that we check the page
    count before we check for PageDirty, since the dirty check is only valid
    if the count implies that we're the only possible ones holding the page.
    
    We always did do this, but the code needs a read-memory-barrier to make
    sure that the orderign is also honored by the CPU.
    
    (The writer side is ordered due to the atomic decrement and test on the
    page count, see the discussion on linux-kernel)
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    3d80636a
vmscan.c 37.2 KB