From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Doug Smythies <dsmythies@telus.net>,
Dirk Brandewie <dirk.j.brandewie@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: [PATCH 3.14 64/78] intel_pstate: Remove C0 tracking
Date: Mon, 9 Jun 2014 15:48:44 -0700 [thread overview]
Message-ID: <20140609224815.398256803@linuxfoundation.org> (raw)
In-Reply-To: <20140609224813.282275135@linuxfoundation.org>
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dirk Brandewie <dirk.j.brandewie@intel.com>
commit adacdf3f2b8e65aa441613cf61c4f598e9042690 upstream.
Commit fcb6a15c (intel_pstate: Take core C0 time into account for core
busy calculation) introduced a regression referenced below. The issue
with "lockup" after suspend that this commit was addressing is now dealt
with in the suspend path.
Fixes: fcb6a15c2e7e (intel_pstate: Take core C0 time into account for core busy calculation)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=66581
Link: https://bugzilla.kernel.org/show_bug.cgi?id=75121
Reported-by: Doug Smythies <dsmythies@telus.net>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/cpufreq/intel_pstate.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -59,7 +59,6 @@ struct sample {
int32_t core_pct_busy;
u64 aperf;
u64 mperf;
- unsigned long long tsc;
int freq;
};
@@ -100,7 +99,6 @@ struct cpudata {
u64 prev_aperf;
u64 prev_mperf;
- unsigned long long prev_tsc;
struct sample sample;
};
@@ -561,46 +559,37 @@ static inline void intel_pstate_calc_bus
struct sample *sample)
{
int32_t core_pct;
- int32_t c0_pct;
core_pct = div_fp(int_tofp((sample->aperf)),
int_tofp((sample->mperf)));
core_pct = mul_fp(core_pct, int_tofp(100));
FP_ROUNDUP(core_pct);
- c0_pct = div_fp(int_tofp(sample->mperf), int_tofp(sample->tsc));
-
sample->freq = fp_toint(
mul_fp(int_tofp(cpu->pstate.max_pstate * 1000), core_pct));
- sample->core_pct_busy = mul_fp(core_pct, c0_pct);
+ sample->core_pct_busy = core_pct;
}
static inline void intel_pstate_sample(struct cpudata *cpu)
{
u64 aperf, mperf;
- unsigned long long tsc;
rdmsrl(MSR_IA32_APERF, aperf);
rdmsrl(MSR_IA32_MPERF, mperf);
- tsc = native_read_tsc();
aperf = aperf >> FRAC_BITS;
mperf = mperf >> FRAC_BITS;
- tsc = tsc >> FRAC_BITS;
cpu->sample.aperf = aperf;
cpu->sample.mperf = mperf;
- cpu->sample.tsc = tsc;
cpu->sample.aperf -= cpu->prev_aperf;
cpu->sample.mperf -= cpu->prev_mperf;
- cpu->sample.tsc -= cpu->prev_tsc;
intel_pstate_calc_busy(cpu, &cpu->sample);
cpu->prev_aperf = aperf;
cpu->prev_mperf = mperf;
- cpu->prev_tsc = tsc;
}
static inline void intel_pstate_set_sample_time(struct cpudata *cpu)
next prev parent reply other threads:[~2014-06-09 22:46 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-09 22:47 [PATCH 3.14 00/78] 3.14.7-stable review Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 01/78] sched: Use CPUPRI_NR_PRIORITIES instead of MAX_RT_PRIO in cpupri check Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 02/78] sched/deadline: Fix memory leak Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 03/78] sched: Sanitize irq accounting madness Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 04/78] perf: Prevent false warning in perf_swevent_add Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 05/78] perf: Limit perf_event_attr::sample_period to 63 bits Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 06/78] perf: Fix race in removing an event Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 07/78] mm/memory-failure.c: fix memory leak by race between poison and unpoison Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 08/78] Documentation: fix DOCBOOKS=... building Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 09/78] hwmon: (ntc_thermistor) Fix dependencies Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 10/78] hwmon: (ntc_thermistor) Fix OF device ID mapping Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 11/78] drm/gf119-/disp: fix nasty bug which can clobber SOR0s clock setup Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 16/78] SCSI: scsi_transport_sas: move bsg destructor into sas_rphy_remove Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 18/78] ARM: omap5: hwmod_data: Correct IDLEMODE for McPDM Greg Kroah-Hartman
2014-06-09 22:47 ` [PATCH 3.14 19/78] ARM: OMAP2+: nand: Fix NAND on OMAP2 and OMAP3 boards Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 21/78] ARM: OMAP4: Fix the boot regression with CPU_IDLE enabled Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 22/78] ARM: 8051/1: put_user: fix possible data corruption in put_user Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 24/78] cpufreq: cpu0: drop wrong devm usage Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 25/78] cpufreq: remove race while accessing cur_policy Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 26/78] firewire: revert to 4 GB RDMA, fix protocols using Memory Space Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 27/78] MIPS: Fix typo when reporting cache and ftlb errors for ImgTec cores Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 28/78] dm thin: add no_space_timeout dm-thin-pool module param Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 29/78] dm cache: always split discards on cache block boundaries Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 30/78] Revert "revert "mm: vmscan: do not swap anon pages just because free+file is low"" Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 31/78] virtio_blk: fix race between start and stop queue Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 32/78] sched: Disallow sched_attr::sched_policy < 0 Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 33/78] sched: Make sched_setattr() correctly return -EFBIG Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 34/78] sched/deadline: Change sched_getparam() behaviour vs SCHED_DEADLINE Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 35/78] sched/deadline: Restrict user params max value to 2^63 ns Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 36/78] sched: Fix hotplug vs. set_cpus_allowed_ptr() Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 37/78] sched/dl: Fix race in dl_task_timer() Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 39/78] drm/i915: Only copy back the modified fields to userspace from execbuffer Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 40/78] drm/radeon/dpm: resume fixes for some systems Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 42/78] libata: Blacklist queued trim for Crucial M500 Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 43/78] sched: Fix sched_policy < 0 comparison Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 44/78] md: always set MD_RECOVERY_INTR when aborting a reshape or other "resync" Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 45/78] md: always set MD_RECOVERY_INTR when interrupting a reshape thread Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 47/78] Staging: speakup: Move pasting into a work item Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 48/78] staging: comedi: ni_daq_700: add mux settling delay Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 49/78] Staging: speakup: Update __speakup_paste_selection() tty (ab)usage to match vt Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 50/78] staging: r8192e_pci: fix htons error Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 51/78] Bluetooth: Fix L2CAP LE debugfs entries permissions Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 52/78] ALSA: hda/analog - Fix silent output on ASUS A8JN Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 53/78] ALSA: hda/realtek - Correction of fixup codes for PB V7900 laptop Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 54/78] ALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 55/78] USB: ftdi_sio: add NovaTech OrionLXm product ID Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 58/78] USB: serial: option: add support for Novatel E371 PCIe card Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 59/78] USB: io_ti: fix firmware download on big-endian machines (part 2) Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 60/78] usb: pci-quirks: Prevent Sony VAIO t-series from switching usb ports Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 61/78] USB: Avoid runtime suspend loops for HCDs that cant handle suspend/resume Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 62/78] percpu-refcount: fix usage of this_cpu_ops Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 63/78] intel_pstate: remove unneeded sample buffers Greg Kroah-Hartman
2014-06-09 22:48 ` Greg Kroah-Hartman [this message]
2014-06-09 22:48 ` [PATCH 3.14 65/78] intel_pstate: Correct rounding in busy calculation Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 66/78] intel_pstate: add sample time scaling Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 67/78] intel_pstate: Improve initial busy calculation Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 68/78] mm: add !pte_present() check on existing hugetlb_entry callbacks Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 69/78] mm: rmap: fix use-after-free in __put_anon_vma Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 70/78] iser-target: Add missing target_put_sess_cmd for ImmedateData failure Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 71/78] iscsi-target: Fix wrong buffer / buffer overrun in iscsi_change_param_value() Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 72/78] target: Fix alua_access_state attribute OOPs for un-configured devices Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 73/78] netfilter: Fix potential use after free in ip6_route_me_harder() Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 74/78] netfilter: nfnetlink: Fix use after free when it fails to process batch Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 77/78] gpio: mcp23s08: Bug fix of SPI device tree registration Greg Kroah-Hartman
2014-06-09 22:48 ` [PATCH 3.14 78/78] [stable PATCH] iommu/vt-d: Fix missing IOTLB flush in intel_iommu_unmap() Greg Kroah-Hartman
2014-06-10 13:26 ` [PATCH 3.14 00/78] 3.14.7-stable review Satoru Takeuchi
2014-06-10 18:46 ` Greg Kroah-Hartman
2014-06-10 15:11 ` Guenter Roeck
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=20140609224815.398256803@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=dirk.j.brandewie@intel.com \
--cc=dsmythies@telus.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=stable@vger.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