From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: "Richard B. Johnson" <root@chaos.analogic.com>
Cc: Dan Parks <Dan.Parks@CAMotion.com>, SA <no_spam@ntlworld.com>,
linux-kernel@vger.kernel.org
Subject: Re: interrupt latency ?
Date: Mon, 10 Feb 2003 18:08:41 +0100 [thread overview]
Message-ID: <20030210170841.GC1973@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <Pine.LNX.3.95.1030210110451.8132A-100000@chaos.analogic.com>
On Mon, 10 February 2003 11:20:54 -0500, Richard B. Johnson wrote:
> On Mon, 10 Feb 2003, [iso-8859-1] J?rn Engel wrote:
>
> > Write a simple handler for parport or so, that is called when line #1
> > toggles from low to high and responds by pulling line #2 from low to
> > high.
> > Now hook up a signal generator and an oszilloscope and measure the
> > time from signal generation to the physical reaction.
>
> Yes, and you will find that you can replicate a square-wave, through
> the hardware and software up to about 50 kHz with a 400 MHz Pentium
> if you disconnect your network during the tests.
>
> My tests, several years ago, in the ISR simply XOR-ed a saved
> copy of bit zero with `1` to toggle it and wrote it out the
> data port. This would occur at every IRQ7, generated by hitting
> bit 2 of the control port with a function generator. This should
> produce a symmetrical /2 when you look at bit 0. You can line up
> the starting 'high' of the function generator, with either a high or
> low of bit one (because it's /2) and measure the time, which from
> my notebook looks like 1.2 to 1.4 microseconds on a 400MHz machine.
>
> You can increase the interrupt rate until the machine is no longer
> able to keep up. This usually occurs around 110 kHz or higher.
1.2us translates to 800kHz or 500 clock cycles. That is a good
response time.
110kHz max rate translates to 3500 clock cycles for the complete
interrupt path. This means that the return path takes six times longer
to complete than the initialisation path. Odd.
Somehow, I get this feeling that linux could still do better. 500
cycles is already better than the 2000 we observed, but most of that
should come from the different architecture.
An assembler interrupt handler that saves registers, tweaks a couple
of bits, restores registers and gets the hell out of here should be in
the order of 100 cycles, maybe less. Why is linux wasting all this
time?
Jörn
--
Simplicity is prerequisite for reliability.
-- Edsger W. Dijkstra
next prev parent reply other threads:[~2003-02-10 16:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-07 18:50 SA
2003-02-10 13:58 ` Jörn Engel
[not found] ` <1044889126.1438.460.camel@localhost>
2003-02-10 15:43 ` Jörn Engel
2003-02-10 16:20 ` Richard B. Johnson
2003-02-10 17:08 ` Jörn Engel [this message]
2003-02-10 18:30 ` Richard B. Johnson
2003-02-11 11:59 ` Jörn Engel
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=20030210170841.GC1973@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=Dan.Parks@CAMotion.com \
--cc=linux-kernel@vger.kernel.org \
--cc=no_spam@ntlworld.com \
--cc=root@chaos.analogic.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
all inboxes | Powered by JetHome®