• Andrew Morton's avatar
    [PATCH] partial prefetch for vma_prio_tree_next · ad9beb31
    Andrew Morton authored
    From: Rajesh Venkatasubramanian <vrajesh@umich.edu>
    
    This patch adds prefetches for walking a vm_set.list.  Adding prefetches
    for prio tree traversals is tricky and may lead to cache trashing.  So this
    patch just adds prefetches only when walking a vm_set.list.
    
    I haven't done any benchmarks to show that this patch improves performance.
     However, this patch should help to improve performance when vm_set.lists
    are long, e.g., libc.  Since we only prefetch vmas that are guaranteed to
    be used in the near future, this patch should not result in cache trashing,
    theoretically.
    
    I didn't add any NULL checks before prefetching because prefetch.h clearly
    says prefetch(0) is okay.
    ad9beb31
prio_tree.c 18.1 KB