From: Malcolm Crossley <malcolm.crossley@citrix.com>
To: Ian Campbell <ian.campbell@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:39:23 +0000 [thread overview]
Message-ID: <569E206B.7080606@citrix.com> (raw)
In-Reply-To: <1453203304.29930.20.camel@citrix.com>
On 19/01/16 11:35, Ian Campbell wrote:
> 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@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?
>>>
>>
>> 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 ;-)
It fixed Andrew's review comment at the same time and it makes for a smaller simpler patch.
Thanks for the review.
Malcolm
>
> Ian.
>
next prev parent reply other threads:[~2016-01-19 11:39 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
2016-01-19 11:10 ` Malcolm Crossley
2016-01-19 11:35 ` Ian Campbell
2016-01-19 11:39 ` Malcolm Crossley [this message]
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=569E206B.7080606@citrix.com \
--to=malcolm.crossley@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.