[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 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?
_______________________________________________
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®.