From: dirk.brandewie@gmail.com
To: linux-pm@vger.kernel.org, rjw@rjwysocki.net
Cc: linux-kernel@vger.kernel.org,
Dirk Brandewie <dirk.j.brandewie@intel.com>
Subject: [PATCH 1/5] intel_pstate: Remove energy reporting from pstate_sample tracepoint
Date: Wed, 12 Feb 2014 10:01:03 -0800 [thread overview]
Message-ID: <1392228067-14817-2-git-send-email-dirk.j.brandewie@intel.com> (raw)
In-Reply-To: <1392228067-14817-1-git-send-email-dirk.j.brandewie@intel.com>
From: Dirk Brandewie <dirk.j.brandewie@intel.com>
Remove the reporting of energy since it does not provide any useful
information about the state of the driver and will be a maintainance
headache going forward since the RAPL energy units register is not
architectural and subject to change between micro-architectures
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
---
drivers/cpufreq/intel_pstate.c | 9 ---------
include/trace/events/power.h | 7 +------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 79606f4..c788abf 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -51,8 +51,6 @@ static inline int32_t div_fp(int32_t x, int32_t y)
return div_s64((int64_t)x << FRAC_BITS, (int64_t)y);
}
-static u64 energy_divisor;
-
struct sample {
int32_t core_pct_busy;
u64 aperf;
@@ -630,12 +628,10 @@ static void intel_pstate_timer_func(unsigned long __data)
{
struct cpudata *cpu = (struct cpudata *) __data;
struct sample *sample;
- u64 energy;
intel_pstate_sample(cpu);
sample = &cpu->samples[cpu->sample_ptr];
- rdmsrl(MSR_PKG_ENERGY_STATUS, energy);
intel_pstate_adjust_busy_pstate(cpu);
@@ -644,7 +640,6 @@ static void intel_pstate_timer_func(unsigned long __data)
cpu->pstate.current_pstate,
sample->mperf,
sample->aperf,
- div64_u64(energy, energy_divisor),
sample->freq);
intel_pstate_set_sample_time(cpu);
@@ -926,7 +921,6 @@ static int __init intel_pstate_init(void)
int cpu, rc = 0;
const struct x86_cpu_id *id;
struct cpu_defaults *cpu_info;
- u64 units;
if (no_load)
return -ENODEV;
@@ -960,9 +954,6 @@ static int __init intel_pstate_init(void)
if (rc)
goto out;
- rdmsrl(MSR_RAPL_POWER_UNIT, units);
- energy_divisor = 1 << ((units >> 8) & 0x1f); /* bits{12:8} */
-
intel_pstate_debug_expose_params();
intel_pstate_sysfs_expose_params();
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 9e9475c..e5bf9a7 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -42,7 +42,6 @@ TRACE_EVENT(pstate_sample,
u32 state,
u64 mperf,
u64 aperf,
- u32 energy,
u32 freq
),
@@ -51,7 +50,6 @@ TRACE_EVENT(pstate_sample,
state,
mperf,
aperf,
- energy,
freq
),
@@ -61,7 +59,6 @@ TRACE_EVENT(pstate_sample,
__field(u32, state)
__field(u64, mperf)
__field(u64, aperf)
- __field(u32, energy)
__field(u32, freq)
),
@@ -72,17 +69,15 @@ TRACE_EVENT(pstate_sample,
__entry->state = state;
__entry->mperf = mperf;
__entry->aperf = aperf;
- __entry->energy = energy;
__entry->freq = freq;
),
- TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu energy=%lu freq=%lu ",
+ TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu freq=%lu ",
(unsigned long)__entry->core_busy,
(unsigned long)__entry->scaled_busy,
(unsigned long)__entry->state,
(unsigned long long)__entry->mperf,
(unsigned long long)__entry->aperf,
- (unsigned long)__entry->energy,
(unsigned long)__entry->freq
)
--
1.8.3.1
next prev parent reply other threads:[~2014-02-12 18:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 18:01 [PATCH 0/5] intel_pstate updates for v3.14-rcX dirk.brandewie
2014-02-12 18:01 ` dirk.brandewie [this message]
2014-02-12 18:01 ` [PATCH 2/5] intel_pstate: remove unneeded sample buffers dirk.brandewie
2014-02-13 0:42 ` Li, Aubrey
2014-02-12 18:01 ` [PATCH 3/5] intel_pstate: fix pid_reset to use fixed point values dirk.brandewie
2014-02-12 18:01 ` [PATCH 4/5] intel_pstate: Use LFM bus ratio as min ratio/P state dirk.brandewie
2014-02-19 0:58 ` Rafael J. Wysocki
2014-02-19 18:35 ` [PATCH v2] " dirk.brandewie
2014-02-20 0:44 ` Rafael J. Wysocki
2014-02-12 18:01 ` [PATCH 5/5] intel_pstate: Add support for Baytrail turbo P states dirk.brandewie
2014-02-13 0:47 ` [PATCH 0/5] intel_pstate updates for v3.14-rcX Rafael J. Wysocki
2014-02-13 1:00 ` Rafael J. Wysocki
2014-02-13 1:23 ` Rafael J. Wysocki
2014-02-18 20:29 ` Dirk Brandewie
2014-02-18 22:27 ` Rafael J. Wysocki
2014-02-18 23:53 ` Dirk Brandewie
2014-02-19 0:34 ` Rafael J. Wysocki
[not found] ` <CANOOhLToR8ajjiM1x7m_4Pbak3sUkjfq0h4EX6dz1U23D3X3EA@mail.gmail.com>
2014-02-19 0:43 ` Rafael J. Wysocki
2014-02-19 0:35 ` Dirk Brandewie
2014-02-19 0:53 ` Rafael J. Wysocki
2014-02-19 18:26 ` Dirk Brandewie
2014-02-20 0:43 ` Rafael J. Wysocki
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=1392228067-14817-2-git-send-email-dirk.j.brandewie@intel.com \
--to=dirk.brandewie@gmail.com \
--cc=dirk.j.brandewie@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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).