• Andrew Morton's avatar
    [PATCH] rmap 16: pretend prio_tree · fc96c90f
    Andrew Morton authored
    From: Hugh Dickins <hugh@veritas.com>
    
    Pave the way for prio_tree by switching over to its interfaces, but actually
    still implement them with the same old lists as before.
    
    Most of the vma_prio_tree interfaces are straightforward.  The interesting one
    is vma_prio_tree_next, used to search the tree for all vmas which overlap the
    given range: unlike the list_for_each_entry it replaces, it does not find
    every vma, just those that match.
    
    But this does leave handling of nonlinear vmas in a very unsatisfactory state:
    for now we have to search again over the maximum range to find all the
    nonlinear vmas which might contain a page, which of course takes away the
    point of the tree.  Fixed in later patch of this batch.
    
    There is no need to initialize vma linkage all over, just do it before
    inserting the vma in list or tree.  /proc/pid/statm had an odd test for its
    shared count: simplified to an equivalent test on vm_file.
    fc96c90f
mmap.c 40.1 KB