aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/x86 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-03-29tools turbostat: harden against cpu online/offlineLen Brown1-54/+61
Sometimes users have turbostat running in interval mode when they take processors offline/online. Previously, turbostat would survive, but not gracefully. Tighten up the error checking so turbostat notices changesn sooner, and print just 1 line on change: turbostat: re-initialized with num_cpus %d Signed-off-by: Len Brown <len.brown@intel.com>
2012-03-29tools turbostat: reduce measurement overhead due to IPIsLen Brown1-0/+46
turbostat uses /dev/cpu/*/msr interface to read MSRs. For modern systems, it reads 10 MSR/CPU. This can be observed as 10 "Function Call Interrupts" per CPU per sample added to /proc/interrupts. This overhead is measurable on large idle systems, and as Yoquan Song pointed out, it can even trick cpuidle into thinking the system is busy. Here turbostat re-schedules itself in-turn to each CPU so that its MSR reads will always be local. This replaces the 10 "Function Call Interrupts" with a single "Rescheduling interrupt" per sample per CPU. On an idle 32-CPU system, this shifts some residency from the shallow c1 state to the deeper c7 state: # ./turbostat.old -s %c0 GHz TSC %c1 %c3 %c6 %c7 %pc2 %pc3 %pc6 %pc7 0.27 1.29 2.29 0.95 0.02 0.00 98.77 20.23 0.00 77.41 0.00 0.25 1.24 2.29 0.98 0.02 0.00 98.75 20.34 0.03 77.74 0.00 0.27 1.22 2.29 0.54 0.00 0.00 99.18 20.64 0.00 77.70 0.00 0.26 1.22 2.29 1.22 0.00 0.00 98.52 20.22 0.00 77.74 0.00 0.26 1.38 2.29 0.78 0.02 0.00 98.95 20.51 0.05 77.56 0.00 ^C i# ./turbostat.new -s %c0 GHz TSC %c1 %c3 %c6 %c7 %pc2 %pc3 %pc6 %pc7 0.27 1.20 2.29 0.24 0.01 0.00 99.49 20.58 0.00 78.20 0.00 0.27 1.22 2.29 0.25 0.00 0.00 99.48 20.79 0.00 77.85 0.00 0.27 1.20 2.29 0.25 0.02 0.00 99.46 20.71 0.03 77.89 0.00 0.28 1.26 2.29 0.25 0.01 0.00 99.46 20.89 0.02 77.67 0.00 0.27 1.20 2.29 0.24 0.01 0.00 99.48 20.65 0.00 78.04 0.00 cc: Youquan Song <youquan.song@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-03-29tools turbostat: add summary optionLen Brown2-69/+120
turbostat -s cuts down on the amount of output, per user request. also treak some output whitespace and the man page. Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-18Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linuxLinus Torvalds1-0/+2
This includes initial support for the recently published ACPI 5.0 spec. In particular, support for the "hardware-reduced" bit that eliminates the dependency on legacy hardware. APEI has patches resulting from testing on real hardware. Plus other random fixes. * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits) acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec intel_idle: Split up and provide per CPU initialization func ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2 ACPI processor: Remove unneeded cpuidle_unregister_driver call intel idle: Make idle driver more robust intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle ACPI: kernel-parameters.txt : Add intel_idle.max_cstate intel_idle: remove redundant local_irq_disable() call ACPI processor: Fix error path, also remove sysdev link ACPI: processor: fix acpi_get_cpuid for UP processor intel_idle: fix API misuse ACPI APEI: Convert atomicio routines ACPI: Export interfaces for ioremapping/iounmapping ACPI registers ACPI: Fix possible alignment issues with GAS 'address' references ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64) ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64) ACPI: Store SRAT table revision ACPI, APEI, Resolve false conflict between ACPI NVS and APEI ACPI, Record ACPI NVS regions ACPI, APEI, EINJ, Refine the fix of resource conflict ...
2012-01-18Merge branches 'einj', 'intel_idle', 'misc', 'srat' and 'turbostat-ivb' into releaseLen Brown1-0/+2
2011-12-15tools/power turbostat: update fields in manpageArun Thomas1-4/+4
Field names were shortened: "pkg" is now "pk", "core" is now "cr" Signed-off-by: Arun Thomas <arun.thomas@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-11-18tools turbostat: recognize and run properly on IVBLen Brown1-0/+2
Signed-off-by: Len Brown <len.brown@intel.com>
2011-11-06Merge branches 'acpi', 'idle', 'mrst-pmu' and 'pm-tools' into nextLen Brown1-13/+15
2011-08-02tools/power turbostat: fit output into 80 columns on snb-epLen Brown1-23/+23
Reduce columns for package number to 1. If you can afford more than 9 packages, you can also afford a terminal with more than 80 columns:-) Also shave a column also off the package C-states Signed-off-by: Len Brown <len.brown@intel.com>
2011-07-15tools/power x86_energy_perf_policy: fix print of uninitialized stringLen Brown1-3/+2
Looks like I was going to stick the brand string in the verbose ouput, but didn't get around to it. Signed-off-by: Len Brown <len.brown@intel.com>
2011-07-03tools/power turbostat: less verbose debuggingLen Brown1-13/+15
dump only the counters which are active Signed-off-by: Len Brown <len.brown@intel.com>
2011-04-26Merge branch 'master' into for-nextJiri Kosina1-1/+1
Fast-forwarded to current state of Linus' tree as there are patches to be applied for files that didn't exist on the old branch.
2011-04-10treewide: remove extra semicolonsJustin P. Mattock1-1/+1
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-02-10tools: turbostat: style updatesLen Brown1-100/+96
Follow kernel coding style traditions more closely. Delete typedef, re-name "per cpu counters" to simply be counters etc. This patch changes no functionality. Suggested-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2011-02-10tools: turbostat: fix bitwise and operandThomas Renninger1-2/+2
bug could cause false positive on indicating presence of invarient TSC or APERF support. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2011-01-11Merge branches 'turbostat' and 'x86_energy_perf_policy' into toolsLen Brown6-0/+1665
2011-01-11tools: create power/x86/x86_energy_perf_policyLen Brown3-0/+437
MSR_IA32_ENERGY_PERF_BIAS first became available on Westmere Xeon. It is implemented in all Sandy Bridge processors -- mobile, desktop and server. It is expected to become increasingly important in subsequent generations. x86_energy_perf_policy is a user-space utility to set the hardware energy vs performance policy hint in the processor. Most systems would benefit from "x86_energy_perf_policy normal" at system startup, as the hardware default is maximum performance at the expense of energy efficiency. See x86_energy_perf_policy.8 man page for more information. Background: Linux-2.6.36 added "epb" to /proc/cpuinfo to indicate if an x86 processor supports MSR_IA32_ENERGY_PERF_BIAS, without actually modifying the MSR. In March, 2010, Venkatesh Pallipadi proposed a small driver that programmed MSR_IA32_ENERGY_PERF_BIAS, based on the cpufreq governor in use. It also offered a boot-time cmdline option to override. http://lkml.org/lkml/2010/3/4/457 But hiding the hardware policy behind the governor choice was deemed "kinda icky". In June, 2010, I proposed a generic user/kernel API to generalize the power/performance policy trade-off. "RFC: /sys/power/policy_preference" http://lkml.org/lkml/2010/6/16/399 That is my preference for implementing this capability, but I received no support on the list. So in September, 2010, I sent x86_energy_perf_policy.c to LKML, a user-space utility that scribbles directly to the MSR. http://lkml.org/lkml/2010/9/28/246 Here is that same utility, after responding to some review feedback, to live in tools/power/, where it is easily found. Signed-off-by: Len Brown <len.brown@intel.com>
2011-01-11tools: create power/x86/turbostatLen Brown3-0/+1228
turbostat is a Linux tool to observe proper operation of Intel(R) Turbo Boost Technology. turbostat displays the actual processor frequency on x86 processors that include APERF and MPERF MSRs. Note that turbostat is of limited utility on Linux kernels 2.6.29 and older, as acpi_cpufreq cleared APERF/MPERF up through that release. On Intel Core i3/i5/i7 (Nehalem) and newer processors, turbostat also displays residency in idle power saving states, which are necessary for diagnosing any cpuidle issues that may have an effect on turbo-mode. See the turbostat.8 man page for example usage. Signed-off-by: Len Brown <len.brown@intel.com>