public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Jonathon Anderson <jma14@rice.edu>
To: Mark Wielaard <mark@klomp.org>
Cc: elfutils-devel@sourceware.org
Subject: Re: [PATCH 2/2] libdw: Rewrite the memory handler to be more robust.
Date: Fri, 08 Nov 2019 17:41:00 -0000	[thread overview]
Message-ID: <1573234880.2134.2@rice.edu> (raw)
In-Reply-To: <9caa7eee4a810e3f26cb2cb4ec4046e15d7dad4e.camel@klomp.org>



On Fri, Nov 8, 2019 at 17:22, Mark Wielaard <mark@klomp.org> wrote:
> On Thu, 2019-11-07 at 12:40 -0600, Jonathon Anderson wrote:
>>  I haven't benchmarked this version, but I did benchmark the 
>> equivalent
>>  earlier version (this version is almost quite literally a rebase of 
>> the
>>  other). I don't have the exact results on hand, what I remember is 
>> that
>>  the pthread_key method was faster (and handled the many-thread case
>>  better), by maybe a factor of 1.5x-2x in parallel. In serial the
>>  overhead was minimal (just an extra pointer indirection on 
>> allocations).
> 
> I just tested the single-threaded case a bit and is not measurable
> slower than the previous version, and compared to 0.177 things are
> maybe ~1% slower (so probably in the noise).
> 
> A factor 1.5x-2.0x slower in parallel does seem significant. Is that 
> in
> the case of many-threads that are colliding a lot or in general?

I believe it was 64 threads colliding a lot (on the reader side of 
mem_rwl). That said, this is all based on my memory from before the 
semester started. (They may also be numbers munged out of a larger 
benchmark, so don't trust them too much).

As it happens, on our end any slowdown is entirely hidden by all the 
other work we do while reading DIEs, so its not a critical concern. Our 
code opens a Dwarf and then uses a #pragma parallel for across the CUs 
(using a serial recursion to read the DIEs), if you want to benchmark 
it that should suffice on a large enough example.

> 
> Thanks,
> 
> Mark

  reply	other threads:[~2019-11-08 17:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 18:55 [PATCH 0/2] " Jonathon Anderson
2019-10-29 20:17 ` Mark Wielaard
2019-10-29 20:22   ` Jonathon Anderson
2019-10-29 21:15     ` [PATCH 1/2] Add configure options for Valgrind annotations Mark Wielaard
2019-10-29 21:15       ` [PATCH 2/2] libdw: Rewrite the memory handler to be more robust Mark Wielaard
2019-11-07 17:20         ` Mark Wielaard
2019-11-07 18:13           ` Jonathon Anderson
2019-11-08 16:22             ` Mark Wielaard
2019-11-07 18:40           ` Jonathon Anderson
2019-11-08 16:22             ` Mark Wielaard
2019-11-08 17:41               ` Jonathon Anderson [this message]
2019-11-07 17:19       ` [PATCH 1/2] Add configure options for Valgrind annotations Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1573234880.2134.2@rice.edu \
    --to=jma14@rice.edu \
    --cc=elfutils-devel@sourceware.org \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).