xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Malcolm Crossley <malcolm.crossley@citrix.com>,
	ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com,
	wei.liu2@citrix.com
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] xenpm: Add option to report average CPU frequency
Date: Tue, 19 Jan 2016 11:06:14 +0000	[thread overview]
Message-ID: <1453201574.29930.16.camel@citrix.com> (raw)
In-Reply-To: <1453200631-11818-1-git-send-email-malcolm.crossley@citrix.com>

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@citrix.com>
> ---
>  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@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-01-19 11:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 10:50 [PATCH] xenpm: Add option to report average CPU frequency Malcolm Crossley
2016-01-19 11:06 ` Ian Campbell [this message]
2016-01-19 11:10   ` Malcolm Crossley
2016-01-19 11:35     ` Ian Campbell
2016-01-19 11:39       ` Malcolm Crossley
2016-01-19 11:16 ` Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453201574.29930.16.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=malcolm.crossley@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).