lkml.org 
[lkml]   [2010]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 0/3] perf: show package power consumption in perf

* Frederic Weisbecker <fweisbec@gmail.com> wrote:

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

If we then measure the delta of the count during that constant-time
period, we'll get a 'weight' to consider.

So for example if we sample with a period of every 1000 cache-misses,
regular same-counter-PMU-IRQ sampling goes like this:

1000
1000
1000
1000
1000
....

While if we use a hrtimer, we get variations:

1050
711
1539
2210
400

But using that variable period as a weight will, statistically,
compensate for the variation.

It's similar to how the auto-freq code works - that too has variable
periods (due to the self-adjustment) - which we compensate with weight.

Thanks,

Ingo


\
 
 \ /
  Last update: 2010-08-21 11:33    [W:1.168 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site