• Hugh Dickins's avatar
    [PATCH] rmaplock: PageAnon in mapping · 6f055bc1
    Hugh Dickins authored
    First of a batch of five patches to eliminate rmap's page_map_lock, replace
    its trylocking by spinlocking, and use anon_vma to speed up swapoff.
    
    Patches updated from the originals against 2.6.7-mm7: nothing new so I won't
    spam the list, but including Manfred's SLAB_DESTROY_BY_RCU fixes, and omitting
    the unuse_process mmap_sem fix already in 2.6.8-rc3.
    
    
    This patch:
    
    Replace the PG_anon page->flags bit by setting the lower bit of the pointer in
    page->mapping when it's anon_vma: PAGE_MAPPING_ANON bit.
    
    We're about to eliminate the locking which kept the flags and mapping in
    synch: it's much easier to work on a local copy of page->mapping, than worry
    about whether flags and mapping are in synch (though I imagine it could be
    done, at greater cost, with some barriers).
    Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    6f055bc1
page_alloc.c 50.6 KB