lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070411130939.GA24875@frankl.hpl.hp.com>
Date:	Wed, 11 Apr 2007 06:09:39 -0700
From:	Stephane Eranian <eranian@....hp.com>
To:	Andi Kleen <ak@...e.de>
Cc:	Venki Pallipadi <venkatesh.pallipadi@...el.com>,
	Adam Belay <abelay@...ell.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, randy.dunlap@...cle.com,
	lenb@...nel.org, Stephane Eranian <eranian@....hp.com>
Subject: Re: 2.6.21-rc6-mm1

Andi,

On Wed, Apr 11, 2007 at 12:39:05PM +0200, Andi Kleen wrote:
> 
> > The next kernel patch for Perfmon will not make use of the idle notification
> > anymore on any platform.
> 
> What do you use instead? 
> 
Nothing. I was using the idle notifier as a way to stop monitoring on entry and
restart on exit. That way you would only measure useful execution.

But there are issues with this approach. In particular, there are some events that
keep on counting during idle (in halted state). And you want to have those counting,
for instance if this is related to bus or caches. For cycle event, the x86 PMU
has CPU_CLK_UNHALTED, and as its name indicates it does not count during halted state,
the firmware shuts it off.

So if you do nothing, you leave it to the firmware to turn on/off certain counters
based on the event they measure. That is the best option. You cannot have
CPU_CLK_UNHALTED working in halted state.

So my point is that you cannot use the PMU to account for wall-clock time when you
go in halted state. Yet, you could use the idle notifier to compensate for it by
recording let's say TSC prior to entry and computing delta on exit. But then I am
not sure what you would do with it given that other events may or may not have
counted during that time, making scaling harder to do.

Once solution, implemented by Itanium Montecito processor, is to have a PMU event
that counts cycles spent in halted state. 

> I've been actually thinking to add idle notifier support to oprofile to correct
> for the "perfctr doesn't tick in idle" issue which makes numbers not add up to 100%. 
> A lot of people are currently running idle=poll to work around this and that is very
> wasteful.
> 
I agree but I believe that this is the only solution at this point.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ