public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alexander van Heukelum <heukelum@fastmail.fm>,
	Ingo Molnar <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
	Cyrill Gorcunov <gorcunov@gmail.com>,
	Alexander van Heukelum <heukelum@mailshack.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	lguest@ozlabs.org, jeremy@xensource.com,
	Steven Rostedt <srostedt@redhat.com>,
	Mike Travis <travis@sgi.com>
Subject: Re: [PATCH RFC/RFB] x86_64, i386: interrupt dispatch changes
Date: Thu, 13 Nov 2008 20:29:36 -0600	[thread overview]
Message-ID: <1226629776.3343.84.camel@calx> (raw)
In-Reply-To: <491CD1DD.3020201@zytor.com>

On Thu, 2008-11-13 at 17:18 -0800, H. Peter Anvin wrote:
> Matt Mackall wrote:
> > On Mon, 2008-11-10 at 21:00 -0800, H. Peter Anvin wrote:
> >> Okay, after spending most of the day trying to get something that isn't
> >> completely like white noise (interesting problem, otherwise I'd have
> >> given up long ago) I did, eventually, come up with something that looks
> >> like it's significant.  I did a set of multiple runs, and am looking for
> >> the "waterfall points" in the cumulative statistics.
> >>
> >> http://www.zytor.com/~hpa/baseline-hpa-3000-3600.pdf
> >>
> >> This particular set of data points was gathered on a 64-bit kernel, so I
> >> didn't try the segment technique.
> >>
> >> It looks to me that the collection of red lines is enough to the left of
> >> the black ones that one can assume there is a significant effect,
> >> probably by about a cache miss worth of time.
> > 
> > This graph is a little confusing. Is the area under each curve here
> > supposed to be a constant?
> > 
> 
> No, they reflect individual runs.  They start at 1 at the top left and
> drop to 0 at the far right in each case.  What matters is the horizontal
> position of large vertical drops.

Still confused. If, say, the top blue line on the left represents the
same number of interrupts as the bottom red one, then at some point it
must cross under the red one as it goes to the right, which it does not
appear to do. Thus, it does not appear the scale on the left is actually
in units of constant probability, no?

Though I'll agree that even if they're not scaled so that the area under
the curve sums to a probability of 1, the centerpoint of the vertical
drop is what matters. But that's rather hard to read off this chart, as
the blue line I mentioned has a center point point well above the red
one, so while it looks like a shift of 80 cycles, it's more like 30.

Is there any theoretical reason you can't just sum the histograms for
runs of the same code and then divide by event count? Is there some sort
of alignment/cache-coloring issue across boots?

> > Is this latency from all interrupts as seen by userspace? Or does a
> > particular interrupt dominate?
> > 
> 
> All interrupts, but rather inherently the difference between interrupt
> handlers is going to be bigger than the differences between
> implementations of the same handler.  I *believe* all the interrupts
> you're seeing in that graph are probably timer interrupts.  The other
> major interrupt source that was active on the system was USB.

That's what I'd expect on an idle system, certainly.

Anyway, I'm actually surprised your red graph is visibly better than
your blue one. FWIW, I was leaning towards your simpler variant (and
away from the magical segment register proposal). I'd be happy to see
either of your versions submitted.

-- 
Mathematics is the supreme nostalgia of our time.


  reply	other threads:[~2008-11-14  2:31 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 12:28 [PATCH RFC/RFB] x86_64, i386: interrupt dispatch changes Alexander van Heukelum
2008-11-04 12:42 ` Ingo Molnar
2008-11-04 13:29   ` Alexander van Heukelum
2008-11-04 14:00     ` Ingo Molnar
2008-11-04 16:23       ` Alexander van Heukelum
2008-11-04 16:47         ` Cyrill Gorcunov
2008-11-04 16:58           ` Ingo Molnar
2008-11-04 17:13             ` Cyrill Gorcunov
2008-11-04 17:29               ` Alexander van Heukelum
2008-11-06  9:19                 ` Ingo Molnar
2008-11-04 20:02       ` Jeremy Fitzhardinge
2008-11-04 20:15         ` H. Peter Anvin
2008-11-04 20:02   ` Jeremy Fitzhardinge
2008-11-04 15:07 ` Cyrill Gorcunov
2008-11-04 15:47   ` Alexander van Heukelum
2008-11-04 16:36     ` Ingo Molnar
2008-11-04 16:45       ` Alexander van Heukelum
2008-11-04 16:54         ` Ingo Molnar
2008-11-04 16:55           ` Ingo Molnar
2008-11-04 16:58           ` Alexander van Heukelum
2008-11-04 17:39           ` Alexander van Heukelum
2008-11-04 17:05   ` Andi Kleen
2008-11-04 18:06     ` Alexander van Heukelum
2008-11-04 18:14       ` H. Peter Anvin
2008-11-04 18:44         ` Alexander van Heukelum
2008-11-04 19:07           ` H. Peter Anvin
2008-11-04 19:33           ` H. Peter Anvin
2008-11-04 20:06             ` Jeremy Fitzhardinge
2008-11-04 20:30             ` Andi Kleen
2008-11-04 20:26               ` H. Peter Anvin
2008-11-04 20:46                 ` Andi Kleen
2008-11-04 20:44       ` Ingo Molnar
2008-11-04 21:06         ` Andi Kleen
2008-11-05  0:42           ` Jeremy Fitzhardinge
2008-11-05  0:50             ` H. Peter Anvin
2008-11-06  9:15             ` Ingo Molnar
2008-11-06  9:25               ` H. Peter Anvin
2008-11-06  9:30                 ` Ingo Molnar
2008-11-05 10:26           ` Ingo Molnar
2008-11-14  1:11             ` Nick Piggin
2008-11-14  1:20               ` H. Peter Anvin
2008-11-14  2:12                 ` Nick Piggin
2008-11-04 21:29         ` Ingo Molnar
2008-11-04 21:35           ` H. Peter Anvin
2008-11-04 21:52             ` Ingo Molnar
2008-11-05 17:53               ` Cyrill Gorcunov
2008-11-05 18:04                 ` H. Peter Anvin
2008-11-05 18:14                   ` Cyrill Gorcunov
2008-11-05 18:20                     ` H. Peter Anvin
2008-11-05 18:26                       ` Cyrill Gorcunov
     [not found]         ` <1226243805.27361.1283784629@webmail.messagingengine.com>
2008-11-10  1:29           ` H. Peter Anvin
2008-11-26 21:35             ` [Lguest] " Avi Kivity
2008-11-26 21:50               ` Avi Kivity
2008-11-27  0:03               ` H. Peter Anvin
2008-11-27 10:13                 ` Avi Kivity
2008-11-27 10:56                   ` Andi Kleen
2008-11-27 10:59                     ` Avi Kivity
2008-11-28 20:48                   ` Alexander van Heukelum
2008-11-29 15:45                     ` Alexander van Heukelum
2008-11-29 18:21                       ` Avi Kivity
2008-11-29 18:22                       ` Avi Kivity
2008-11-29 19:58                         ` Ingo Molnar
2008-12-01  4:32                         ` Rusty Russell
2008-12-01  8:00                           ` Ingo Molnar
2008-12-01  9:24                           ` Avi Kivity
2008-12-01 10:32                             ` Cyrill Gorcunov
2008-12-01 10:41                               ` Avi Kivity
2008-12-01 10:49                                 ` Ingo Molnar
2008-11-10  8:58           ` Ingo Molnar
2008-11-10 12:44             ` Alexander van Heukelum
2008-11-10 13:07               ` Ingo Molnar
2008-11-10 21:35                 ` Alexander van Heukelum
2008-11-10 22:21                   ` H. Peter Anvin
2008-11-11  5:00                   ` H. Peter Anvin
2008-11-13 22:23                     ` Matt Mackall
2008-11-14  1:18                       ` H. Peter Anvin
2008-11-14  2:29                         ` Matt Mackall [this message]
2008-11-14  3:22                           ` H. Peter Anvin
2008-11-11  9:54                   ` Ingo Molnar
2008-11-10 15:39             ` H. Peter Anvin
2008-11-10 21:44               ` Alexander van Heukelum
2008-11-10 23:34                 ` H. Peter Anvin
2008-11-05 18:15     ` Cyrill Gorcunov

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=1226629776.3343.84.camel@calx \
    --to=mpm@selenic.com \
    --cc=andi@firstfloor.org \
    --cc=gorcunov@gmail.com \
    --cc=heukelum@fastmail.fm \
    --cc=heukelum@mailshack.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@xensource.com \
    --cc=lguest@ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.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