From: yodaiken@fsmlabs.com
To: "Richard B. Johnson" <root@chaos.analogic.com>
Cc: yodaiken@fsmlabs.com, Mark Hounschell <markh@compro.net>,
"Wessler, Siegfried" <Siegfried.Wessler@de.hbm.com>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: Re: interrupt latency
Date: Wed, 28 Aug 2002 07:41:48 -0600 [thread overview]
Message-ID: <20020828074148.B23738@hq.fsmlabs.com> (raw)
In-Reply-To: <Pine.LNX.3.95.1020828080308.14759A-101000@chaos.analogic.com>; from root@chaos.analogic.com on Wed, Aug 28, 2002 at 08:18:25AM -0400
On Wed, Aug 28, 2002 at 08:18:25AM -0400, Richard B. Johnson wrote:
> On Tue, 27 Aug 2002 yodaiken@fsmlabs.com wrote:
>
> > On Tue, Aug 27, 2002 at 04:44:34PM -0400, Richard B. Johnson wrote:
> > > On Tue, 27 Aug 2002 yodaiken@fsmlabs.com wrote:
> > >
>
> [SNIPPED...]B
> >
> > You can do it in a tight loop. But you cannot do it otherwise. RS232 works
> > because most UARTs have fifo buffers. Old Windows did pretty well, because
> > you could grab the machine and let nothing else happen.
> >
> > What makes me dubious about your claim is that it is easy to test
> > and see that a single ISA operation can take 18 microseconds
> > on most PC hardware.
> >
> > try:
> > cli
> > loop:
> > read tsc
> > inb
> > read tsc
> > compute difference
> > print worst case every 1000000 times.
> >
> > sti
> >
> > run for an hour on a busy machine.
> >
> >
>
> No, no, no. There is no such port read that takes 18 microseconds, even
> on old '386 machines with real ISR slots. A port read on those took
Sorry, but the numbers don't lie. It's an easy test to make.
The test you have below tests something else entirely. It tests
average time over a period of something around 1 second.
> (void)alarm(1);
> run++;
> while(run)
> {
> foo[0] = inb(0x378); /* Actually put into memory */
> count++; /* This takes as long as bumping a pointer */
> }
> printf("\nPort reads in a second = %lu\n", count);
> return 0;
> }
Average and worst case are different.
next prev parent reply other threads:[~2002-08-28 13:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-27 9:58 interrupt latency Wessler, Siegfried
2002-08-27 14:11 ` Stephen Samuel
2002-08-27 17:16 ` Robert Schwebel
2002-08-27 21:44 ` Stephen Samuel
2002-08-27 17:41 ` Mark Hounschell
2002-08-27 18:01 ` Richard B. Johnson
2002-08-27 19:54 ` yodaiken
2002-08-27 20:44 ` Richard B. Johnson
2002-08-27 20:56 ` yodaiken
2002-08-27 22:47 ` Rogier Wolff
2002-08-28 12:18 ` Richard B. Johnson
2002-08-28 13:41 ` yodaiken [this message]
2002-08-28 14:25 ` Jonathan Lundell
2002-08-28 13:53 ` yodaiken
2002-08-28 15:02 ` Richard B. Johnson
2002-08-28 15:19 ` yodaiken
2002-08-28 15:31 ` Alan Cox
2002-08-28 15:37 ` Richard B. Johnson
2002-08-28 16:53 ` Randy.Dunlap
2002-08-28 12:42 ` Pavel Machek
2002-08-27 18:05 ` Dag Nygren
-- strict thread matches above, loose matches on Subject: below --
2002-10-30 23:50 Keith Adamson
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=20020828074148.B23738@hq.fsmlabs.com \
--to=yodaiken@fsmlabs.com \
--cc=Siegfried.Wessler@de.hbm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
--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