public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kristian Benoit <kbenoit@opersys.com>
To: paulmck@us.ibm.com
Cc: Karim Yaghmour <karim@opersys.com>,
	linux-kernel@vger.kernel.org, bhuey@lnxw.com, andrea@suse.de,
	tglx@linutronix.de, mingo@elte.hu, pmarques@grupopie.com,
	bruce@andrew.cmu.edu, nickpiggin@yahoo.com.au, ak@muc.de,
	sdietrich@mvista.com, dwalker@mvista.com, hch@infradead.org,
	akpm@osdl.org, Philippe Gerum <rpm@xenomai.org>
Subject: Re: PREEMPT_RT vs I-PIPE: the numbers, part 2
Date: Wed, 22 Jun 2005 13:20:03 -0400	[thread overview]
Message-ID: <1119460803.5825.13.camel@localhost> (raw)
In-Reply-To: <20050622162718.GD1296@us.ibm.com>

On Wed, 2005-06-22 at 09:27 -0700, Paul E. McKenney wrote:
> On Wed, Jun 22, 2005 at 11:31:39AM -0400, Karim Yaghmour wrote:
> > 
> > Paul E. McKenney wrote:
> > > Probably just my not fully understanding I-PIPE (to say nothing of
> > > not fully understanding your test setup!), but I would have expected
> > > I-PIPE to be able to get somewhere in the handfuls of microseconds of
> > > interrupt latency.  Looks like it prevents Linux from ever disabling
> > > real interrupts -- my first guess after reading your email was that
> > > Linux was disabling real interrupts and keeping I-PIPE from getting
> > > there in time.
> > 
> > Have a look at the announcement just made by Kristian about the LRTBF.
> > There's a tarball with all the code for the drivers, scripts and
> > configs we used.
> 
> I see that now, cool!!!  And thank you and Kristian for putting this
> together!

You're welcome. Thanks to Karim and Opersys that showed me the
path !! :)

> > Nevertheless, maybe it's worth that I clarify the setup further.
> > Here's what we had:
> > 
> >                      +----------+
> >                      |   HOST   |
> >                      +----------+
> >                           |
> >                           |
> >                           | Ethernet LAN
> >                           |
> >                          / \
> >                         /   \
> >                        /     \
> >                       /       \
> >                      /         \
> >                     /           \
> >                    /             \
> >             +--------+  SERIAL  +--------+
> >             | LOGGER |----------| TARGET |
> >             +--------+          +--------+
> > 
> > The logger sends an interrupt to the target every 1ms. Here's the
> > path travelled by this interrupt (L for logger, T for target):
> > 
> > 1- L:adeos-registered handler is called at timer interrupt
> > 2- L:record TSC for transmission
> > 3- L:write out to parallel port
> > 4- T:ipipe-registered handler called to receive interrupt
> > 5- T:write out to parallel port
> > 6- L:adeos-registered handler called to receive interrupt
> > 7- L:record TSC for receipt
> > 
> > The response times obtained include all that goes on from 2 to
> > 7, including all hardware-related delays. The target's true
> > response time is from 3.5 to 5.5 (the .5 being the actual
> > time it takes for the signal to reache the pins on the actual
> > physical parallel port outside the computer.)
> > 
> > The time from 2 to 3.5 includes the execution time for a few
> > instructions (record TSC value to RAM and outb()) and the delay
> > for the hardware to put the value out on the parallel port.
> > 
> > The time from 5.5 to 7 includes an additional copy of adeos'
> > interrupt response time. IOW, in all cases, we're at least
> > recording adeos' interrupt response time at least once. Like
> > we explained in our first posting (and as backed up by the
> > data found in both postings) the adeos-to-adeos setup shows
> > that this delay is bound. In fact, we can safely assume that
> > 2*max_ipipe_delay ~= 55us and that 2*average_ipipe_delay
> > ~= 14us. And therefore:
> > 
> > max_ipipe_delay = 27.5us
> > average_ipipe_delay = 7us
> > max_preempt_delay = 55us - max_ipipe_delay = 27.5us
> > average_preempt_delay = 14 us - average_ipipe_delay = 7us
> > 
> > Presumably the 7us above should fit the "handful" you refer
> > to. At least I hope.
> 
> I have big hands, so 7us could indeed qualify as a "handful".
> 
> Any insights as to what leads to the larger maximum delay?  Some guesses
> include worst-case cache-miss patterns and interrupt disabling that I
> missed in my quick scan of the patch.
> 
> If I understand your analysis correctly (hah!!!), your breakdown
> of the maximum delay assumes that the maximum delays for the logger
> and the target are correlated.  What causes this correlation?
> My (probably hopelessly naive) assumption would be that there would
> be no such correlation.  In absence of correlation, one might
> approximate the maximum ipipe delay by subtracting the -average-
> ipipe delay from the maximum preemption delay, for 55us - 7us = 48us.
> Is this the case, or am I missing something here?

Your analysis is correct, but with 600,000 samples, it is possible that
we got 2 peeks (perhaps not maximum), one on the logger and one on the
target. So in my point of view, the maximum value is probably somewhere
between 55us / 2 and 55us - 7us. And probably closer to 55us / 2.

> Of course, in the case of the -average- preemption measurements, dividing
> by two to get the average ipipe delay makes perfect sense.
> 
> Whatever the answer to my maximum-delay question, the same breakdown of
> the raw latency figures would apply to the CONFIG_PREEMPT_RT case, right?
> 
> 						Thanx, Paul
> 

Kristian


  reply	other threads:[~2005-06-22 17:27 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-20 17:13 PREEMPT_RT vs I-PIPE: the numbers, part 2 Kristian Benoit
2005-06-20 18:31 ` Bill Huey
2005-06-22 16:00   ` Karim Yaghmour
2005-06-22 19:29     ` Bill Huey
2005-06-22 20:05       ` Ingo Molnar
2005-06-22 20:39         ` Karim Yaghmour
2005-06-22 22:04           ` Ingo Molnar
2005-06-22 23:03             ` Lee Revell
2005-06-22 23:52               ` Karim Yaghmour
2005-06-22 23:38             ` Karim Yaghmour
2005-06-22 23:57               ` Andrea Arcangeli
2005-06-23  0:05               ` Daniel Walker
2005-06-23  0:48                 ` Karim Yaghmour
2005-06-23  0:06               ` Ingo Molnar
2005-06-23  0:47                 ` Karim Yaghmour
2005-06-23  0:55                   ` Bill Huey
2005-06-23  1:09                     ` Karim Yaghmour
2005-06-23  1:15                       ` Bill Huey
2005-06-23  1:47                         ` Karim Yaghmour
2005-06-23  0:59                   ` David Lang
2005-06-23  1:22                     ` Karim Yaghmour
2005-06-23  1:42                       ` David Lang
2005-06-23  2:09                         ` Karim Yaghmour
2005-06-23  2:15                           ` David Lang
2005-06-23  1:34                   ` Ingo Molnar
2005-06-23  2:02                     ` Karim Yaghmour
2005-06-23  3:57                       ` Lee Revell
2005-06-23  4:13                         ` Karim Yaghmour
2005-06-22 20:10       ` Karim Yaghmour
2005-06-22 20:15         ` Bill Huey
2005-06-21  1:55 ` Paul E. McKenney
2005-06-21  2:29   ` Karim Yaghmour
2005-06-22  1:19     ` Paul E. McKenney
2005-06-22 15:31       ` Karim Yaghmour
2005-06-22 15:27         ` Kristian Benoit
2005-06-22 16:27         ` Paul E. McKenney
2005-06-22 17:20           ` Kristian Benoit [this message]
2005-06-22 17:34             ` Ingo Molnar
2005-06-22 17:40               ` Ingo Molnar
2005-06-22 18:12                 ` Karim Yaghmour
2005-06-22 18:14                   ` Ingo Molnar
2005-06-22 19:04                     ` Karim Yaghmour
2005-06-22 18:50             ` Paul E. McKenney
2005-06-22 19:04               ` Ingo Molnar
2005-06-22 20:17                 ` Karim Yaghmour
2005-06-22 20:22                   ` Ingo Molnar
2005-06-22 21:03                     ` Karim Yaghmour
2005-06-22 21:10                       ` Ingo Molnar
2005-06-22 21:32                         ` Karim Yaghmour
2005-06-22 22:41                       ` Ingo Molnar
2005-06-22 23:02                         ` Karim Yaghmour
2005-06-22 21:20                 ` Paul E. McKenney
2005-06-22 19:08               ` Karim Yaghmour
2005-06-23 14:48             ` Paulo Marques
2005-06-22 17:58           ` Karim Yaghmour
2005-06-22 18:47             ` Paul E. McKenney
2005-06-22 19:16               ` Karim Yaghmour
2005-06-22 21:23                 ` Paul E. McKenney
2005-06-22 17:17         ` Lee Revell
2005-06-22 17:32           ` Karim Yaghmour
2005-06-29  7:43           ` PREEMPT_RT & threading IRQ 0 Ingo Molnar

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=1119460803.5825.13.camel@localhost \
    --to=kbenoit@opersys.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=bhuey@lnxw.com \
    --cc=bruce@andrew.cmu.edu \
    --cc=dwalker@mvista.com \
    --cc=hch@infradead.org \
    --cc=karim@opersys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=paulmck@us.ibm.com \
    --cc=pmarques@grupopie.com \
    --cc=rpm@xenomai.org \
    --cc=sdietrich@mvista.com \
    --cc=tglx@linutronix.de \
    /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