From: "Frank Ch. Eigler" <fche@redhat.com>
To: Martin Hunt <hunt@redhat.com>
Cc: systemtap@sources.redhat.com
Subject: Re: tutorial draft checked in
Date: Fri, 10 Mar 2006 12:50:00 -0000 [thread overview]
Message-ID: <20060310125046.GA6930@redhat.com> (raw)
In-Reply-To: <1141983106.3380.46.camel@dragon>
Hi -
hunt wrote:
> [...]
> We have argued this again and again. I see no reason why you want the
> translator to be more complicated and slower. [...]
You misjudge my intention.
> For the specific case of pmaps I am sure I spent more time arguing about
> it than writing it. The disadvantages of what you want to do are
>
> 1. Reader locks are slow. They don't scale as well as per-cpu spinlocks.
At least this is a quantifiable concern.
> 2. The translator holds the lock during the whole probe vs the runtime
> which holds the lock as short a time as possible.
Among other things, this guarantees ACID-style properties for probe
handlers, and prevents various race conditions.
> 3. Having the translator handle low-level locking eliminates the
> possibility of switching the runtime to a more efficient lockless
> solution later.
By removing locks from the runtime that the translator makes
redundant, we still have a "lockless" solution. If locks can be done
away with entirely, the translator can be taught not to emit them.
It's probably one line of code change.
> > Anyway, if the advantage of having unshared per-cpu locks for the <<<
> > case was large, the translator could adopt the technique just as
> > easily.
>
> Obviously not true.
WHAT can you possibly mean by that? The translator could emit per-cpu
spinlocks for pmaps. Its programmer would not even break a sweat.
> It is already done and works in the runtime pmap implementation.
Yes, but the question is where better to put the locking.
> I ran a few benchmarks to demonstrate pmaps scalability and measure the
> additional overhead from the translator reader-writer locks. [...]
Good.
> I ran threads that were making syscalls as fast as possible.
> Results are Kprobes/sec
> 1 thread 4 threads
> Regular 340 500
> Pmaps 340 940
> Pmaps* 380 1040
>
> Pmaps* is pmaps with the redundant reader-writer locks removed.
How about a result with the redundant spinlocks removed?
> Measured overhead of those locks is approximately 10% of the cpu
> time for this test case.
It sounds a bit high, considering all the other overhead involved.
An oprofile count of SMP type events would be interesting.
- FChE
next prev parent reply other threads:[~2006-03-10 12:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-03 17:56 Frank Ch. Eigler
2006-03-03 21:16 ` Martin Hunt
2006-03-03 21:50 ` William Cohen
2006-03-10 0:51 ` Frank Ch. Eigler
2006-03-10 9:32 ` Martin Hunt
2006-03-10 12:50 ` Frank Ch. Eigler [this message]
2006-03-07 0:47 ` Jim Keniston
2006-03-10 17:55 ` Frank Ch. Eigler
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=20060310125046.GA6930@redhat.com \
--to=fche@redhat.com \
--cc=hunt@redhat.com \
--cc=systemtap@sources.redhat.com \
/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).