Re: [PATCH] cpupower: mperf monitor: fix output in MAX_FREQ_SYSFS mode

From: Thomas Renninger
Date: Wed May 27 2015 - 09:25:04 EST


Hi,

and sorry for the late answer, this had not highest prio...

On Wednesday, May 20, 2015 02:26:47 AM Rafael J. Wysocki wrote:
> On Monday, May 11, 2015 12:40:22 PM Herton R. Krzesinski wrote:
> > On Mon, May 11, 2015 at 11:35:35AM -0300, Herton R. Krzesinski wrote:
> > > There is clearly wrong output when mperf monitor runs in MAX_FREQ_SYSFS
> > > mode: average frequency shows in kHz unit (despite the intended output
> > > to be in MHz), and percentages for C state information are all wrong
> > > (including high/negative values shown).
> > >
> > > The problem is that the max_frequency read on initialization isn't used
> > > where it should have been used on mperf_get_count_percent (to estimate
> > > the number of ticks in the given time period), and the value we read
> > > from sysfs is in kHz, so we must divide it to get the MHz value to use
> > > in current calculations.
> > >
> > > While at it, also I fixed another small issues in the debug output of
> > > max_frequency value in mperf_get_count_freq.
> > >
> > > Signed-off-by: Herton R. Krzesinski <herton@xxxxxxxxxx>
> > > ---
> > >
> > > tools/power/cpupower/utils/idle_monitor/mperf_monitor.c | 5 +++--
> > > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > Actually please consider v2 patch below, just a minor change in the debug
> > output, which isn't a percentage...
>
> Thomas, any comments?

I tried to find fitting HW without much success.
The MAX_FREQ_SYSFS is used only on rare HW and it may never got a proper test.

Patch looks sane. Even I cannot add a Tested-by:
you may add:

Acked-by: Thomas Renninger <trenn@xxxxxxx>

and add it.

Thanks,

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