Skip to content
  • Mel Gorman's avatar
    mm, page_alloc: inline the fast path of the zonelist iterator · 682a3385
    Mel Gorman authored
    The page allocator iterates through a zonelist for zones that match the
    addressing limitations and nodemask of the caller but many allocations
    will not be restricted.  Despite this, there is always functional call
    overhead which builds up.
    
    This patch inlines the optimistic basic case and only calls the iterator
    function for the complex case.  A hindrance was the fact that
    cpuset_current_mems_allowed is used in the fastpath as the allowed
    nodemask even though all nodes are allowed on most systems.  The patch
    handles this by only considering cpuset_current_mems_allowed if a cpuset
    exists.  As well as being faster in the fast-path, this removes some
    junk in the slowpath.
    
    The performance difference on a page allocator microbenchmark is;
    
                                                 4.6.0-rc2                  4.6.0-rc2
                                          statinline-v1r20              optiter-v1r20
      Min      alloc-odr0-1               412.00 (  ...
    682a3385