1. 10 2月, 2015 5 次提交
    • L
      tools/power turbostat: Skip printing disabled package C-states · ee7e38e3
      Len Brown 提交于
      Replaced previously open-coded Package C-state Limit decoding
      with table-driven decoding.  In doing so, updated to match January 2015
      "Intel(R) 64 and IA-23 Architectures Software Developer's Manual".
      
      In the past, turbostat would print package C-state residency columns
      for all package states supported by the model's architecture, even though
      a particular SKU may not support them, or they may be disabled by the BIOS.
      Now turbostat will skip printing colunns if MSRs indicate that they are not enabled.
      eg. many SKUs don't support PC7, and so that column will no longer be printed.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      ee7e38e3
    • L
      tools/power turbostat: relax dependency on APERF_MSR · a729617c
      Len Brown 提交于
      While turbostat is significantly less useful on systems
      with no APERF_MSR, it seems more friendly
      to run on such systems and report what we can,
      rather than refusing to run.
      
      Update man page to reflect recent changes.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a729617c
    • L
      tools/power turbostat: relax dependency on invariant TSC · d7899447
      Len Brown 提交于
      Turbostat can be useful on systems that do not support invariant TSC,
      so allow it to run on those systgems.
      
      All arithmetic in turbostat using the TSC value is per-processsor,
      so it does not depend on the TSC values being in sync acrosss processors.
      
      Turbostat uses gettimeofday() for the measurement interval
      rather than using the TSC directly, so that key metric
      is also immune from variable TSC.
      
      Turbostat prints a TSC sanity check column:
      
      TSC_MHz = TSC_delta/interval
      
      If this column is constant and is close to the processor
      base frequency, then the TSC is behaving properly.
      
      The other key turbostat columns are calculated this way:
      
      Avg_Mhz = APERF_delta/interval
      
      %Busy = MPERF_delta/TSC_delta
      
      Bzy_MHz = TSC_delta/APERF_delta/MPERF_delta/interval
      
      Tested on Core2 and Core2-Xeon, and so this patch includes
      a few other changes to remove the assumption that target
      systems are Nehalem and newer.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d7899447
    • L
      tools/power turbostat: decode MSR_*_PERF_LIMIT_REASONS · 3a9a941d
      Len Brown 提交于
      The Processor generation code-named Haswell
      added MSR_{CORE | GFX | RING}_PERF_LIMIT_REASONS
      to explain when and how the processor limits frequency.
      
      turbostat -v
      will now decode these bits.
      
      Each MSR has an "Active" set of bits which describe
      current conditions, and a "Logged" set of bits,
      which describe what has happened since last cleared.
      
      Turbostat currently doesn't clear the log bits.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      3a9a941d
    • L
      tools/power turbostat: relax dependency on root permission · 98481e79
      Len Brown 提交于
      For turbostat to run as non-root, it needs to permissions:
      
      1. read access to /dev/cpu/*/msr
      	via standard user/group/world file permissions
      
      2. CAP_SYS_RAWIO
      	eg.  # setcap cap_sys_rawio=ep turbostat
      
      Yes, running as root still works.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      98481e79
  2. 16 8月, 2014 1 次提交
  3. 07 5月, 2014 1 次提交
    • J
      tools / power: turbostat: Drop temperature checks · 3482124a
      Jean Delvare 提交于
      The Intel 64 and IA-32 Architectures Software Developer's Manual says
      that TjMax is stored in bits 23:16 of MSR_TEMPERATURE TARGET (0x1a2).
      That's 8 bits, not 7, so it must be masked with 0xFF rather than 0x7F.
      
      The manual has no mention of which values should be considered valid,
      which kind of implies that they all are. Arbitrarily discarding values
      outside a specific range is wrong. The upper range check had to be
      fixed recently (commit 144b44b1) and the lower range check is just as
      wrong. See bug #75071:
      
      https://bugzilla.kernel.org/show_bug.cgi?id=75071
      
      There are many Xeon processor series with TjMax of 70, 71 or 80
      degrees Celsius, way below the arbitrary 85 degrees Celsius limit.
      There may be other (past or future) models with even lower limits.
      
      So drop this arbitrary check. The only value that would be clearly
      invalid is 0. Everything else should be accepted.
      
      After these changes, turbostat is aligned with what the coretemp
      driver does.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Cc: Len Brown <len.brown@intel.com>
      Acked-by: NGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3482124a
  4. 06 3月, 2014 2 次提交
    • L
      tools/power turbostat: Run on Broadwell · 4e8e863f
      Len Brown 提交于
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4e8e863f
    • L
      tools/power turbostat: simplify output, add Avg_MHz · fc04cc67
      Len Brown 提交于
      Use 8 columns for each number ouput.
      We don't fit into 80 columns on most machines,
      so keep the format simple.
      
      Print frequency in MHz instead of GHz.
      We've got 8 columns now, so use them to
      show low frequency in a more natural unit.
      
      Many users didn't understand what %c0 meant,
      so re-name it to be %Busy.
      
      Add Avg_MHz column, which is the frequency that many
      users expect to see -- the total number of cycles executed
      over the measurement interval.
      
      People found the previous GHz to be confusing, since
      it was the speed only over the non-idle interval.
      That measurement has been re-named Bzy_MHz.
      
      Suggested-by: Dirk J. Brandewie
      Signed-off-by: NLen Brown <len.brown@intel.com>
      fc04cc67
  5. 02 2月, 2014 2 次提交
  6. 19 1月, 2014 10 次提交
  7. 13 11月, 2013 1 次提交
    • L
      tools / power turbostat: Support Silvermont · 144b44b1
      Len Brown 提交于
      Support the next generation Intel Atom processor
      mirco-architecture, formerly called Silvermont.
      
      The server version, formerly called "Avoton",
      is named the "Intel(R) Atom(TM) Processor C2000 Product Family".
      
      The client version, formerly called "Bay Trail",
      is named the "Intel Atom Processor Z3000 Series",
      as well as various "Intel Pentium Processor"
      and "Intel Celeron Processor" brands, depending
      on form-factor.
      
      Silvermont has a set of MSRs not far off from NHM,
      but the RAPL register set is a sub-set of those previously supported.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      144b44b1
  8. 14 6月, 2013 1 次提交
  9. 18 4月, 2013 1 次提交
  10. 15 3月, 2013 1 次提交
  11. 14 2月, 2013 1 次提交
    • L
      tools/power turbostat: display SMI count by default · 1ed51011
      Len Brown 提交于
      The SMI counter is popular -- so display it by default
      rather than requiring an option.  What the heck,
      we've blown the 80 column budget on many systems already...
      
      Note that the value displayed is the delta
      during the measurement interval.
      The absolute value of the counter can still be seen with
      the generic 32-bit MSR option, ie.  -m 0x34
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1ed51011
  12. 09 2月, 2013 2 次提交
  13. 30 11月, 2012 3 次提交
    • M
      tools/power: turbostat: make Makefile a bit more capable · ee0778a3
      Mark Asselstine 提交于
      The turbostat Makefile is pretty simple, its output is placed in the
      same directory as the source, the install rule has no concept of a
      prefix or sysroot, and you can set CC to use a specific compiler but
      not use the more familiar CROSS_COMPILE. By making a few minor changes
      these limitations are removed while leaving the default behavior
      matching what it used to be.
      
      Example build with these changes:
      make CROSS_COMPILE=i686-wrs-linux-gnu- DESTDIR=/tmp install
      
      or from the tools directory
      make CROSS_COMPILE=i686-wrs-linux-gnu- DESTDIR=/tmp turbostat_install
      Signed-off-by: NMark Asselstine <mark.asselstine@windriver.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      ee0778a3
    • L
      tools/power turbostat: v3.0: monitor Watts and Temperature · 889facbe
      Len Brown 提交于
      Show power in Watts and temperature in Celsius
      when hardware support is present.
      
      Intel's Sandy Bridge and Ivy Bridge processor generations support RAPL
      (Run-Time-Average-Power-Limiting).  Per the Intel SDM
      (Intel® 64 and IA-32 Architectures Software Developer Manual)
      RAPL provides hardware energy counters and power control MSRs
      (Model Specific Registers).  RAPL MSRs are designed primarily
      as a method to implement power capping.  However, they are useful
      for monitoring system power whether or not power capping is used.
      
      In addition, Turbostat now shows temperature from DTS
      (Digital Thermal Sensor) and PTM (Package Thermal Monitor) hardware,
      if present.
      
      As before, turbostat reads MSRs, and never writes MSRs.
      
      New columns are present in turbostat output:
      
      The Pkg_W column shows Watts for each package (socket) in the system.
      On multi-socket systems, the system summary on the 1st row shows the sum
      for all sockets together.
      
      The Cor_W column shows Watts due to processors cores.
      Note that Core_W is included in Pkg_W.
      
      The optional GFX_W column shows Watts due to the graphics "un-core".
      Note that GFX_W is included in Pkg_W.
      
      The optional RAM_W column on server processors shows Watts due to DRAM DIMMS.
      As DRAM DIMMs are outside the processor package, RAM_W is not included in Pkg_W.
      
      The optional PKG_% and RAM_% columns on server processors shows the % of time
      in the measurement interval that RAPL power limiting is in effect on the
      package and on DRAM.
      
      Note that the RAPL energy counters have some limitations.
      
      First, hardware updates the counters about once every milli-second.
      This is fine for typical turbostat measurement intervals > 1 sec.
      However, when turbostat is used to measure events that approach
      1ms, the counters are less useful.
      
      Second, the 32-bit energy counters are subject to wrapping.
      For example, a counter incrementing 15 micro-Joule units
      on a 130 Watt TDP server processor could (in theory)
      roll over in about 9 minutes.  Turbostat detects and handles
      up to 1 counter overflow per measurement interval.
      But when the measurement interval exceeds the guaranteed
      counter range, we can't detect if more than 1 overflow occured.
      So in this case turbostat indicates that the results are
      in question by replacing the fractional part of the Watts
      in the output with "**":
      
      Pkg_W  Cor_W GFX_W
        3**    0**   0**
      
      Third, the RAPL counters are energy (Joule) counters -- they sum up
      weighted events in the package to estimate energy consumed.  They are
      not analong power (Watt) meters.  In practice, they tend to under-count
      because they don't cover every possible use of energy in the package.
      The accuracy of the RAPL counters will vary between product generations,
      and between SKU's in the same product generation, and with temperature.
      
      turbostat's -v (verbose) option now displays more power and thermal configuration
      information -- as shown on the turbostat.8 manual page.
      For example, it now displays the Package and DRAM Thermal Design Power (TDP):
      
      cpu0: MSR_PKG_POWER_INFO: 0x2f064001980410 (130 W TDP, RAPL 51 - 200 W, 0.045898 sec.)
      cpu0: MSR_DRAM_POWER_INFO,: 0x28025800780118 (35 W TDP, RAPL 15 - 75 W, 0.039062 sec.)
      cpu8: MSR_PKG_POWER_INFO: 0x2f064001980410 (130 W TDP, RAPL 51 - 200 W, 0.045898 sec.)
      cpu8: MSR_DRAM_POWER_INFO,: 0x28025800780118 (35 W TDP, RAPL 15 - 75 W, 0.039062 sec.)
      Signed-off-by: NLen Brown <len.brown@intel.com>
      889facbe
    • L
      tools/power turbostat: fix output buffering issue · ddac0d68
      Len Brown 提交于
      In periodic mode, turbostat writes to stdout,
      but users were un-able to re-direct stdout, eg.
      
      turbostat > outputfile
      
      would result in an empty outputfile.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      ddac0d68
  14. 27 11月, 2012 1 次提交
    • L
      tools/power turbostat: prevent infinite loop on migration error path · e52966c0
      Len Brown 提交于
      Turbostat assumed if it can't migrate to a CPU, then the CPU
      must have gone off-line and turbostat should re-initialize
      with the new topology.
      
      But if turbostat can not migrate because it is restricted by
      a cpuset, then it will fail to migrate even after re-initialization,
      resulting in an infinite loop.
      
      Spit out a warning when we can't migrate
      and endure only 2 re-initialize cycles in a row
      before giving up and exiting.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e52966c0
  15. 24 11月, 2012 1 次提交
  16. 01 11月, 2012 2 次提交
  17. 07 10月, 2012 1 次提交
  18. 28 9月, 2012 1 次提交
  19. 27 9月, 2012 3 次提交
    • L
      tools/power turbostat: add [-m MSR#] option · 2f32edf1
      Len Brown 提交于
      -m MSR# prints the specified MSR in 32-bit format
      -M MSR# prints the specified MSR in 64-bit format
      Signed-off-by: NLen Brown <len.brown@intel.com>
      2f32edf1
    • L
      tools/power turbostat: make -M output pretty · 130ff304
      Len Brown 提交于
      The -M option dumps the specified 64-bit MSR with every sample.
      
      Previously it was output at the end of each line.
      However, with the v2 style of printing, the lines are now staggered,
      making MSR output hard to read.
      
      So move the MSR output column to the left where things are aligned.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      130ff304
    • L
      tools/power turbostat: print more turbo-limit information · 6574a5d5
      Len Brown 提交于
      The "turbo-limit" is the maximum opportunistic processor
      speed, assuming no electrical or thermal constraints.
      For a given processor, the turbo-limit varies, depending
      on the number of active cores.  Generally, there is more
      opportunity when fewer cores are active.
      
      Under the "-v" verbose option, turbostat would
      print the turbo-limits for the four cases
      of 1 to 4 cores active.
      
      Expand that capability to cover the cases of turbo
      opportunities with up to 16 cores active.
      
      Note that not all hardware platforms supply this information,
      and that sometimes a valid limit may be specified for
      a core which is not actually present.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      6574a5d5