DragonFly BSD
DragonFly commits List (threaded) for 2013-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: libc - Add poor man's cache coloring optimization to nmalloc module.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Jan 2013 14:29:18 -0800 (PST)

commit 8120f5e2a46e669c06a7afdd7de60fa6d6996f9d
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Fri Jan 4 14:24:12 2013 -0800

    libc - Add poor man's cache coloring optimization to nmalloc module.
    
    * A series of large allocations in excess of 32KB will be offset by 4K from
      each other.  This fixes performance issues on SandyBridge and later cpus
      related to large matrix operations.
    
      This eats an extra 4K of VM for such allocations but does not eat any
      additional real memory.
    
    * Greatly improves large FP matrix benchmarks.  Real-world effects are more
      questionable.
    
    * The Sandybridge and later cpus use a virtually indexed, physically tagged
      L1 cache, and tend to be sensitive to substantially different memory
      addresses winding up on the same cache line.  Matrix operations (primarily
      benchmarks) can cause these sorts of effects.
    
    Reported-by: alexh

Summary of changes:
 lib/libc/stdlib/nmalloc.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8120f5e2a46e669c06a7afdd7de60fa6d6996f9d


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]