Re: register_timer_hook use in arch/sh/oprofile

From: Ingo Molnar
Date: Wed Jun 24 2009 - 08:46:05 EST



* Paul Mundt <lethal@xxxxxxxxxxxx> wrote:

> My current plan is to migrate things over to the perf_counter API
> and annoy Ingo with my interrupt deprived counters ;-)

Please do :-)

I just wrote a longer explanation about them: i think they can be
made full-blown hardware counters, which in the end would be
basically just as capable as 'real' IRQ capable counters.

The main complication that such counters bring is that in their 'own
metric' they do interrupt periods in an 'irregular' way (because
they interrupt in the nanosec metric - being hrtimers) - but both
the tools can deal with uneven periods just fine and the auto-freq
code can auto-balance based on this just fine too.

So you should be able to implement this within arch/sh/ with
existing perf_counter facilities and hrtimers, or you can help us
librarize it in kernel/perf_counter.c some more, to minimize
architecture code.

[ Of course, given that you are the first architecture to do this,
you would be fair to expect some unexpected details along the way
as well ;-) ]

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/