From: Stephane Eranian <eranian@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: idle notifier question
Date: Tue, 29 Aug 2006 16:13:46 +0000 [thread overview]
Message-ID: <20060829161346.GL22011@frankl.hpl.hp.com> (raw)
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
reply other threads:[~2006-08-29 16:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20060829161346.GL22011@frankl.hpl.hp.com \
--to=eranian@hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox