[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xenpm: Add option to report average CPU frequency



On Tue, 2016-01-19 at 11:10 +0000, Malcolm Crossley wrote:
> On 19/01/16 11:06, Ian Campbell wrote:
> > On Tue, 2016-01-19 at 10:50 +0000, Malcolm Crossley wrote:
> > > The average is calculated over the period of time from the last
> > > xenpm report of the average CPU frequency.
> > > 
> > > Reporting the average CPU frequency helps confirm the level of turbo
> > > boost being achieved per CPU.
> > > 
> > > Signed-off-by: Malcolm Crossley <malcolm.crossley@xxxxxxxxxx>
> > > ---
> > > Âtools/misc/xenpm.c | 42 +++++++++++++++++++++++++++++++++++++++++-
> > > Â1 file changed, 41 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c
> > > index 08f2242..40cdd55 100644
> > > --- a/tools/misc/xenpm.c
> > > +++ b/tools/misc/xenpm.c
> > > @@ -45,6 +45,8 @@ void show_help(void)
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂ"xenpm command list:\n\n"
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂ" get-cpuidle-statesÂÂÂÂ[cpuid]ÂÂÂÂÂÂÂlist cpu idle info
> > > of
> > > CPU <cpuid> or all\n"
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂ" get-cpufreq-statesÂÂÂÂ[cpuid]ÂÂÂÂÂÂÂlist cpu freq info
> > > of
> > > CPU <cpuid> or all\n"
> > > +ÂÂÂÂÂÂÂÂÂÂÂÂ" get-cpufreq-averageÂÂÂ[cpuid]ÂÂÂÂÂÂÂaverage cpu
> > > frequency
> > > since last invocation\n"
> > > +ÂÂÂÂÂÂÂÂÂÂÂÂ"ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfor CPU <cpuid> or
> > > all\n"
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂ" get-cpufreq-paraÂÂÂÂÂÂ[cpuid]ÂÂÂÂÂÂÂlist cpu freq
> > > parameter of CPU <cpuid> or all\n"
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂ" set-scaling-maxfreqÂÂÂ[cpuid] <HZ>ÂÂset max cpu
> > > frequency
> > > <HZ> on CPU <cpuid>\n"
> > > ÂÂÂÂÂÂÂÂÂÂÂÂÂ"ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂor all CPUs\n"
> > > @@ -296,6 +298,9 @@ static int get_pxstat_by_cpuid(xc_interface
> > > *xc_handle, int cpuid, struct xc_px_
> > > ÂÂÂÂÂreturn ret;
> > > Â}
> > > Â
> > > +
> > > +static int *avgfreq;
> > 
> > Do we need the global array of them all when each element is used
> > exactly
> > once entirely within show_cpufreq_by_cpuid in this mode?
> > 
> 
> The global array was already defined for when xenpm is used as a cpu 
> frequency control daemon, I
> just moved it so that the new functions could use the variable.
> 
> Do you want me to spin the patch using a local int variable instead?

I was going to say yes please, but I see v2 already arrived with that
change ;-)

Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.