* idle notifier question
@ 2006-08-29 16:13 Stephane Eranian
0 siblings, 0 replies; only message in thread
From: Stephane Eranian @ 2006-08-29 16:13 UTC (permalink / raw)
To: linux-ia64
Hello,
In the context of perfmon (and the effort to merge it with mainline),
I am looking at adding support for notification on idle. Basically,
you can register a call back when entering the idle() loop and another
callback when you leave. The callback is surrounding the lowest level
of the idle loop, typically where you go low-power. The callback
covers interrupts that get you out of idle.
Why is this useful for perfmon?
When measuring in system-wide, it is interesting to exclude the useless
execution inside the idle loop. Originally, this meant not counting during
the cycle-burning idle loop. However we are interested in measuring any
interrupt triggered execution in the context of the idle loop.
These days, there is no cycle burning loop anymore but rather the CPU goes
into low power mode. That has an impact on the performance counters.
Depending on the architecture, the PMU may be fully stopped, sometimes only
certain counters are stopped (based on the event they measure), sometimes there
are firmware bugs. In order to provide a uniform interface across all platforms,
we could leverage the idle notification mechanism to explicitely start/stop
monitoring when going in the lowest-level of the idle loop (i.e., low-power).
This callback notification for idle already exists on x86-64. I am
working on adding it to i386. I would need to add it to IA-64 as well.
Looking at cpu_idle(), I see there is already some callback mechanism,
with the mark_idle function pointer. It seems to be used only for the
SGI machines. The way it is currently setup, the entry callback is
invoked only when a task is blocking. I am not sure of the intent
here. I am wondering if the existing callback could also work
with the idle notification scheme.
Any idea?
--
-Stephane
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-29 16:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-29 16:13 idle notifier question Stephane Eranian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox