This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2][malloc] Use relaxed atomics for malloc have_fastchunks
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Tue, 26 Sep 2017 12:07:30 +0000
- Subject: Re: [PATCH v2][malloc] Use relaxed atomics for malloc have_fastchunks
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- References: <DB6PR0801MB2053F5C639E8EBEE0E90CDB483660@DB6PR0801MB2053.eurprd08.prod.outlook.com> (message from Wilco Dijkstra on Thu, 21 Sep 2017 18:43:20 +0000),<xnshffsnmm.fsf@greed.delorie.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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