* Interval timer
@ 2008-03-05 9:41 Matthew Chapman
2008-03-05 9:53 ` Robin Holt
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Matthew Chapman @ 2008-03-05 9:41 UTC (permalink / raw)
To: linux-ia64
Is there any interval timer on HP zx1 platforms, other than the
CPU-based ITC/ITM?
All I need is some mechanism that can deliver an interrupt "after a
short time", where I don't care exactly how long that is, but preferably
of the order of several microseconds (pinging the chipset is a bit short
I think).
I used to use the PMU for this - the PMU is useful for an incredible
number of things - but this was causing a bug (because of the 'freeze'
behaviour on an interrupt, I miss important events in other counters).
Multiplexing ITC/ITM complicates my common path so I'm trying to avoid
doing that if I can find any other way...
Any ideas?
Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Interval timer
2008-03-05 9:41 Interval timer Matthew Chapman
@ 2008-03-05 9:53 ` Robin Holt
2008-03-05 10:22 ` Matthew Chapman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Robin Holt @ 2008-03-05 9:53 UTC (permalink / raw)
To: linux-ia64
On Wed, Mar 05, 2008 at 08:41:28PM +1100, Matthew Chapman wrote:
> Is there any interval timer on HP zx1 platforms, other than the
> CPU-based ITC/ITM?
How fine grained do you need? How much jitter are you willing to
tolerate? How much multiplexing are we talking about?
Robin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Interval timer
2008-03-05 9:41 Interval timer Matthew Chapman
2008-03-05 9:53 ` Robin Holt
@ 2008-03-05 10:22 ` Matthew Chapman
2008-03-05 21:19 ` Robin Holt
2008-03-05 22:36 ` Matthew Chapman
3 siblings, 0 replies; 5+ messages in thread
From: Matthew Chapman @ 2008-03-05 10:22 UTC (permalink / raw)
To: linux-ia64
On Wed, Mar 05, 2008 at 03:53:52AM -0600, Robin Holt wrote:
> On Wed, Mar 05, 2008 at 08:41:28PM +1100, Matthew Chapman wrote:
> > Is there any interval timer on HP zx1 platforms, other than the
> > CPU-based ITC/ITM?
>
> How fine grained do you need? How much jitter are you willing to
> tolerate? How much multiplexing are we talking about?
I don't need any strong guarantees other than the fact that an
interrupt arrives 'sometime in the next millisecond' after
programming the timer - ideally the timeouts I want are of the
order of 10 microseconds (+/- an order of magnitude), but large
jitter is fine.
I'm just looking for a separate mechanism for short-ish timeouts
in my hypervisor, that doesn't involve having to hijack ITM
(the latter being used for HZ-order events).
Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Interval timer
2008-03-05 9:41 Interval timer Matthew Chapman
2008-03-05 9:53 ` Robin Holt
2008-03-05 10:22 ` Matthew Chapman
@ 2008-03-05 21:19 ` Robin Holt
2008-03-05 22:36 ` Matthew Chapman
3 siblings, 0 replies; 5+ messages in thread
From: Robin Holt @ 2008-03-05 21:19 UTC (permalink / raw)
To: linux-ia64
On Wed, Mar 05, 2008 at 09:22:32PM +1100, Matthew Chapman wrote:
> On Wed, Mar 05, 2008 at 03:53:52AM -0600, Robin Holt wrote:
> > On Wed, Mar 05, 2008 at 08:41:28PM +1100, Matthew Chapman wrote:
> > > Is there any interval timer on HP zx1 platforms, other than the
> > > CPU-based ITC/ITM?
> >
> > How fine grained do you need? How much jitter are you willing to
> > tolerate? How much multiplexing are we talking about?
>
> I don't need any strong guarantees other than the fact that an
> interrupt arrives 'sometime in the next millisecond' after
> programming the timer - ideally the timeouts I want are of the
> order of 10 microseconds (+/- an order of magnitude), but large
> jitter is fine.
How about setting HZ to 1024 and using regular add_timer() timers?
Thanks,
Robin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Interval timer
2008-03-05 9:41 Interval timer Matthew Chapman
` (2 preceding siblings ...)
2008-03-05 21:19 ` Robin Holt
@ 2008-03-05 22:36 ` Matthew Chapman
3 siblings, 0 replies; 5+ messages in thread
From: Matthew Chapman @ 2008-03-05 22:36 UTC (permalink / raw)
To: linux-ia64
On Wed, Mar 05, 2008 at 03:19:16PM -0600, Robin Holt wrote:
>
> How about setting HZ to 1024 and using regular add_timer() timers?
I'd really like to get shorter timeouts in the common case.
(Also, I was trying to avoid dealing with timer ticks at all in my
hypervisor, leaving the details of setting ITC and ITM in the hands of
the [single trusted] Linux kernel running on the hypervisor. I guess I
could run a uniformly fast timer tick in the hypervisor and deliver
timer interrupts to the guest kernel on the closest tick, but I don't
really like that solution, it's incurring extra overhead 'just in case'
you happen to need a timeout in the hypervisor.)
Anyway, I've written code to hijack ITM if the existing ITM is too far
in the future, and then restore the previous value of ITM after the
interrupt. It works okay in the absence of better solutions.
Matt
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-03-05 22:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-05 9:41 Interval timer Matthew Chapman
2008-03-05 9:53 ` Robin Holt
2008-03-05 10:22 ` Matthew Chapman
2008-03-05 21:19 ` Robin Holt
2008-03-05 22:36 ` Matthew Chapman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox