[lkml]   [2006]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] i386 add idle notifier

On Thu, Nov 30, 2006 at 12:21:41AM +0100, Andi Kleen wrote:
> > An alternative approach might be to change perfmon so that it works out
> > whether it is being called by an idle thread
> >
> > if ((current->flags & PF_IDLE) && (other stuff to do with irqs?))
> > return;
> The problem is that the performance counters just keep running in the CPU.
> Perfmon needs to do something actively to disable them.

> Actually on x86 they usually stop in true idle state in hardware, but
> they don't do in polling mode and it sometimes seems to depend on
> the firmware. So it mostly would be for idle=poll
Most likely. But we also have the deal with other architectures such
as MIPS,IA64, and PPC.

> But if you do walk clock time profiling exactly because they stop
> a profiler should account for this somehow. Otherwise the profiling time
> doesn't add up to 100%
Yes. Note that perfmon does maintain the duration when monitornig was active.
So it is possible to determine active time and use it to scale counts.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-11-30 09:25    [W:0.051 / U:1.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site