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] [day] [month] [year] [list]
Date:	Mon, 23 Aug 2010 11:31:36 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Matt Fleming <matt@...sole-pimps.org>,
	Zhang Rui <rui.zhang@...el.com>,
	"Lin, Ming M" <ming.m.lin@...el.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"robert.richter@....com" <robert.richter@....com>,
	"acme@...hat.com" <acme@...hat.com>,
	"paulus@...ba.org" <paulus@...ba.org>,
	"dzickus@...hat.com" <dzickus@...hat.com>,
	"gorcunov@...il.com" <gorcunov@...il.com>,
	"Brown, Len" <lenb@...nel.org>,
	Matthew Garrett <mjg59@...f.ucam.org>
Subject: Re: [RFC PATCH 0/3] perf: show package power consumption in perf

On Sat, 2010-08-21 at 03:18 +0200, Frederic Weisbecker wrote:
> On Thu, Aug 19, 2010 at 11:44:45AM +0200, Peter Zijlstra wrote:
> > On Thu, 2010-08-19 at 09:32 +0100, Matt Fleming wrote:
> > > 
> > > 
> > > How big is the hardware counter? The problem comes when the process is
> > > scheduled in and runs for a long time, e.g. so long that the energy
> > > hardware counter wraps. This is why it's necessary to periodically
> > > sample the counter.
> > > 
> > Long running processes aren't the only case, you could associate an
> > event with a CPU.

> I don't understand what you mean.

perf_event_open(.pid = -1, .cpu = n);

> > Right, short counters (like SH when not chained) need something to
> > accumulate deltas into the larger u64. You can indeed use timers for
> > that, hr or otherwise, but you don't need the swcounter hrtimer
> > infrastructure for that.
> 
> 
> So what is the point in simulating a PMI using an hrtimer? It won't be
> based on periods on the interesting counter but on time periods. This
> is not how we want the samples. If we want timer based samples, we can
> just launch a seperate software timer based event.

*sigh* that's exactly what we're doing, we're creating a separate
software hrtimer to create samples, the only thing that's different is
that we put this hrtimer and the hw-counter in a group and let the
hrtimer sample include the hw-counter's value.

If you then weight the samples by the hw-counter delta, you get
something that's more or less related to the thing the hw-counter is
counting.

For counter's that do no provide overflow interrupts this is the only
possible way to get anything.

> In the case of SH where we need to flush to avoid wraps, I understand, but
> oterwise?

The wrap issue it totally unrelated.


--
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