From: "Robert Schöne" <robert.schoene@tu-dresden.de>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: Dave Jones <davej@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
cpufreq <cpufreq@vger.kernel.org>,
x86@kernel.org
Subject: Re: [PATCH] trace power_frequency events on the correct cpu (for Intel x86 CPUs)
Date: Fri, 12 Mar 2010 16:41:46 +0100 [thread overview]
Message-ID: <1268408506.3407.17.camel@localhost> (raw)
In-Reply-To: <4B9A552D.6080103@linux.intel.com>
Am Freitag, den 12.03.2010, 06:52 -0800 schrieb Arjan van de Ven:
> On 3/12/2010 5:17, Robert Schöne wrote:
> > This patch fixes the following behaviour:
> > Currently, the power_frequency event is reported for the cpu (core) which initiated the frequency change.
> > It should be reported for the cpu that actually changes its frequency.
> >
> > Example: when using
> > taskset -c 0 echo<new_frequency> > /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed
> > cpu 0 is traced, instead of cpu 1
> >
> > Signed of by Robert Schoene<robert.schoene@tu-dresden.de>
> >
> >
> > diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > index 1b1920f..0a47f10 100644
> > --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
> > @@ -174,6 +174,7 @@ static void do_drv_write(void *_cmd)
> >
> > switch (cmd->type) {
> > case SYSTEM_INTEL_MSR_CAPABLE:
> > + trace_power_frequency(POWER_PSTATE, cmd->val);
> > rdmsr(cmd->addr.msr.reg, lo, hi);
> > lo = (lo& ~INTEL_MSR_RANGE) | (cmd->val& INTEL_MSR_RANGE);
> > wrmsr(cmd->addr.msr.reg, lo, hi);
> > @@ -363,7 +364,6 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
> > }
> > }
> >
> > - trace_power_frequency(POWER_PSTATE, data->freq_table[next_state].frequency);
> >
> > switch (data->cpu_feature) {
> > case SYSTEM_INTEL_MSR_CAPABLE:
> >
> >
>
> are you sure this is right?
> it's moving something from outside a switch statement to inside only one prong of a switch statement...
I'm pretty sure, since I'm moving it from function acpi_cpufreq_target(...) to do_drv_write(...)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Robert Schoene
Technische Universitaet Dresden
Zentrum fuer Informationsdienste und Hochleistungsrechnen
01062 Dresden
Tel.: (0351) 463-42483, Fax: (0351) 463-37773
E-Mail: Robert.Schoene@tu-dresden.de
next prev parent reply other threads:[~2010-03-12 15:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 13:17 [PATCH] trace power_frequency events on the correct cpu (for Intel x86 CPUs) Robert Schöne
2010-03-12 14:52 ` Arjan van de Ven
2010-03-12 15:41 ` Robert Schöne [this message]
2010-03-15 10:51 ` Thomas Renninger
2010-03-16 7:13 ` Robert Schöne
2010-03-16 9:57 ` Ingo Molnar
2010-03-16 10:59 ` Thomas Renninger
2010-03-16 14:19 ` Arjan van de Ven
2010-03-16 14:50 ` Thomas Renninger
2010-03-16 16:40 ` Arjan van de Ven
2010-03-17 16:36 ` Thomas Renninger
2010-03-17 16:41 ` Arjan van de Ven
2010-03-18 20:43 ` Thomas Renninger
2010-03-19 8:01 ` Robert Schöne
2010-03-20 21:37 ` Thomas Renninger
2010-03-22 0:42 ` Arjan van de Ven
2010-03-22 7:04 ` Robert Schöne
2010-03-22 13:57 ` Arjan van de Ven
2010-03-23 16:28 ` Robert Schöne
2010-03-23 16:57 ` Thomas Renninger
2010-03-23 16:58 ` Arjan van de Ven
2010-03-24 7:07 ` Robert Schöne
2010-03-30 5:46 ` Robert Schöne
2010-03-30 8:56 ` Thomas Renninger
2010-03-31 6:40 ` Robert Schöne
2010-04-12 6:53 ` Robert Schöne
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=1268408506.3407.17.camel@localhost \
--to=robert.schoene@tu-dresden.de \
--cc=arjan@linux.intel.com \
--cc=cpufreq@vger.kernel.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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).