[PATCH v2][malloc] Use relaxed atomics for malloc have_fastchunks

Wilco Dijkstra Wilco.Dijkstra@arm.com
Tue Sep 26 12:07:00 GMT 2017


DJ Delorie wrote:
    
> Results of benchmarks...  Note that dj2 is a synthetic test, so the
> slowdown is not surprising, and that all tests are averages of 16 runs
> except git-cinnabar-helper which is only two pristine and one patched
> (it takes 20 minutes per run and I got impatient ;).  Values are cycles,
> lower is better.
>
> Workload                      Pristine         Patched      
> 389ds                     9,121,687,695    8,017,021,813   87.89%
> dj2                       7,901,004,232    8,277,784,940  104.77%
> git-cinnabar-helper     100,123,244,269  90,058,896,622   89.95%
> okular-1                  3,648,656,309    3,220,751,900   88.27%
> oocalc                    1,053,984,703    1,009,859,213   95.81%
> qemu-virtio                 781,260,028      766,458,246   98.11%
> qemu-win7                   655,497,193      626,270,566   95.54%
> proprietary-2             2,112,159,165    1,977,684,058   93.63%
>                        
>                                                Mean     94.25%
>
> Patch looks good to me otherwise, caveat any futher complaints about
> concurrency ;-)

Thanks, that looks very good indeed! Are these all multithreaded?
I'm working on a few tweaks to improve single-threaded performance.

Btw have you tried running these traces with say:
export GLIBC_TUNABLES=glibc.malloc.tcache_count=100

It would be interesting to find out whether that (or even larger values)
helps your traces too like it does the benchmarks I've tried.

Wilco


More information about the Libc-alpha mailing list