From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Franck Bui-Huu <vagabon.xyz@gmail.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-mips@linux-mips.org
Subject: Re: [PATCH 3/5] Deforest the function pointer jungle in the time code.
Date: Fri, 15 Jun 2007 15:21:22 +0100 [thread overview]
Message-ID: <20070615142122.GC16133@linux-mips.org> (raw)
In-Reply-To: <Pine.LNX.4.64N.0706151446020.3754@blysk.ds.pg.gda.pl>
On Fri, Jun 15, 2007 at 03:08:14PM +0100, Maciej W. Rozycki wrote:
> > The tickless kernel needs something that can be used as oneshoot timer.
>
> A periodic timer typically works here just fine -- just "forget" about
> the future shots. ;-)
That's pretty much how for example on an R1 core the compare interrupt
has to be used - IE7 is shared with the performance counter so can't be
disabled and as the result if the cp0 clockevent device is unused we will
get one useless but also harmless interrupt every 2^32 cycles.
> Even the miserable 8254/8259 combination is fine as
> the former in the mode #2 only deasserts its output for its one input
> clock, so the latter will only miss an interrupt if it has been on hold
> for much too long anyway. With an interrupt controller that implements
> real edge-triggered inputs even this single clock is not an issue.
>
> > > Note that the 8254 can be reprogrammed into a one-shot mode, but somehow
> > > nobody does it. ;-) Similarly for the local APIC timer that is used for
> > > scheduling on i386 systems (if available).
> >
> > Actually modern i386 kernels use it in both modes. But this can't help
>
> Oh really? How many clone chipset bugs has it triggered? ;-)
I'm sure you couldn't miss the screaming on linux-kernel ;-)
> > over the fact that the i8253/i8254 is a horrible chip with extremly slow
> > access times so it's only used as the fallback when everything else fails.
>
> The chip is typically in the south bridge these days, so the access time
> is not as bad itself as it used to be when it was a discrete one somewhere
> on the x-bus, but the actual problem is the typical Intel baroque way of
> accessing the counter: ask it to latch the current value, then issue two
> reads to retrieve the two halves of the counter, plus check the lower half
> has not overflown into the upper one meanwhile in case the latch command
> did not work because of a chipset bug. ;-)
Actually these days it seems to be living inside the southbridge behind
an extremly slow interface which is optimized for minimum connections to
the rest of the southbridge. So I'm told the access time is still around
2µs which is basically as crappy as it always has been.
Ralf
next prev parent reply other threads:[~2007-06-15 14:25 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-14 10:19 [RFD] Time rework [take #2] Franck Bui-Huu
2007-06-14 10:19 ` [PATCH 1/5] Use generic NTP code for all MIPS platforms Franck Bui-Huu
2007-06-14 10:19 ` [PATCH 2/5] Remove unused time.c for swarm Franck Bui-Huu
2007-06-14 10:19 ` [PATCH 3/5] Deforest the function pointer jungle in the time code Franck Bui-Huu
2007-06-14 11:17 ` Thomas Bogendoerfer
2007-06-14 13:43 ` Franck Bui-Huu
2007-06-14 14:09 ` Maciej W. Rozycki
2007-06-14 14:31 ` Franck Bui-Huu
2007-06-14 16:33 ` Maciej W. Rozycki
2007-06-14 16:54 ` Maciej W. Rozycki
2007-06-15 8:59 ` Franck Bui-Huu
2007-06-15 11:07 ` Maciej W. Rozycki
2007-06-15 13:26 ` Ralf Baechle
2007-06-15 14:08 ` Maciej W. Rozycki
2007-06-15 14:21 ` Ralf Baechle [this message]
2007-06-15 14:24 ` Franck Bui-Huu
2007-06-15 14:38 ` Ralf Baechle
2007-06-15 15:34 ` Franck Bui-Huu
2007-06-15 14:35 ` Sergei Shtylyov
2007-06-15 13:49 ` Ralf Baechle
2007-06-15 14:42 ` Sergei Shtylyov
2007-06-17 13:36 ` Franck Bui-Huu
2007-06-17 16:14 ` Atsushi Nemoto
2007-06-18 9:38 ` Franck Bui-Huu
2007-06-18 15:51 ` Atsushi Nemoto
2007-06-19 7:33 ` Franck Bui-Huu
2007-06-19 16:08 ` Atsushi Nemoto
2007-06-19 16:22 ` Sergei Shtylyov
2007-06-19 16:55 ` Franck Bui-Huu
2007-06-19 21:58 ` Ralf Baechle
2007-06-20 10:27 ` Franck Bui-Huu
2007-06-19 17:00 ` Franck Bui-Huu
2007-06-19 17:26 ` Sergei Shtylyov
2007-06-19 17:31 ` Sergei Shtylyov
2007-06-19 19:34 ` Sergei Shtylyov
2007-06-18 12:41 ` Franck Bui-Huu
2007-06-19 19:25 ` Sergei Shtylyov
2007-06-20 10:24 ` Franck Bui-Huu
2007-06-14 15:52 ` Franck Bui-Huu
2007-06-14 16:45 ` Maciej W. Rozycki
2007-06-14 10:20 ` [PATCH 4/5] Consolidate all variants of MIPS cp0 timer interrupt handlers Franck Bui-Huu
2007-06-14 10:20 ` [PATCH 5/5] Implement clockevents for R4000-style cp0 timer Franck Bui-Huu
2007-06-14 12:29 ` Atsushi Nemoto
2007-06-14 13:00 ` Franck Bui-Huu
2007-06-17 0:04 ` Ralf Baechle
2007-06-17 17:23 ` Atsushi Nemoto
2007-06-17 19:25 ` Ralf Baechle
2007-06-18 14:22 ` Franck Bui-Huu
2007-06-18 15:14 ` Ralf Baechle
2007-06-18 15:38 ` Franck Bui-Huu
2007-06-18 15:55 ` Franck Bui-Huu
2007-06-18 16:01 ` Ralf Baechle
2007-06-18 17:42 ` Ralf Baechle
2007-06-18 15:37 ` Ralf Baechle
2007-06-19 17:00 ` Sergei Shtylyov
2007-06-20 8:15 ` Ralf Baechle
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=20070615142122.GC16133@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@linux-mips.org \
--cc=tsbogend@alpha.franken.de \
--cc=vagabon.xyz@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.