idle notifier question

From: Stephane Eranian <eranian_at_hpl.hp.com>
Date: 2006-08-30 02:13:46
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
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Aug 30 02:24:42 2006

This archive was generated by hypermail 2.1.8 : 2006-08-30 02:24:57 EST