1. 13 3月, 2016 4 次提交
  2. 17 2月, 2016 4 次提交
  3. 14 11月, 2015 1 次提交
  4. 22 10月, 2015 1 次提交
  5. 20 10月, 2015 1 次提交
    • L
      tools/power turbostat: simplify Bzy_MHz calculation · 21ed5574
      Len Brown 提交于
          Bzy_MHz = TSC_delta*tsc_tweak/APERF_delta/MPERF_delta/measurement_interval
      
      becomes
      
          Bzy_MHz = base_mhz/APERF_delta/MPERF_delta
      
      on systems which support MSR_NHM_PLATFORM_INFO.
      
      base_mhz is calculated directly from the base_ratio
      reported in MSR_NHM_PLATFORM_INFO * bclk,
      and bclk is discovered via MSR or cpuid.
      
      This reduces the dependency of Bzy_MHz calculation on the TSC.
      Previously, there were 4 TSC readings required in each caculation,
      the raw TSC delta combined with the measurement_interval.
      This also removes the "tsc_tweak" correction factor used when
      TSC runs on a different base clock from the CPU's bclk.
      
      After this change, tsc_tweak is used only for %Busy.
      
      The end-result should be a Bzy_MHz result slightly less prone to jitter.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      21ed5574
  6. 26 9月, 2015 4 次提交
    • L
      tools/power turbosat: update version number · af71b980
      Len Brown 提交于
      Signed-off-by: NLen Brown <len.brown@intel.com>
      af71b980
    • L
      tools/power turbostat: SKL: Adjust for TSC difference from base frequency · a2b7b749
      Len Brown 提交于
      On a Skylake with 1500MHz base frequency,
      the TSC runs at 1512MHz.
      
      This is because the TSC is no longer in the n*100 MHz BCLK domain,
      but is now in the m*24MHz crystal clock domain. (24 MHz * 63 = 1512 MHz)
      
      This adds error to several calculations in turbostat,
      unless the TSC sample sizes are adjusted for this difference.
      
      Note that calculations in the time domain are immune
      from this issue, as the timing sub-system has already
      calibrated the TSC against a known wall clock.
      
      AVG_MHz = APERF_delta/measurement_interval
      
      	need no adjustment.  APERF_delta is in the BCLK domain,
      	and measurement_interval is in the time domain.
      
      TSC_MHz  =  TSC_delta/measurement_interval
      
      	needs no adjustment -- as we really do want to report
      	the actual measured TSC delta here, and measurement_interval
      	is in the accurate time domain.
      
      %Busy = MPERF_delta/TSC_delta
      
      	needs adjustment to use TSC_BCLK_DOMAIN_delta.
      	TSC_BCLK_DOMAIN_delta = TSC_delta * base_hz / tsc_hz
      
      Bzy_MHz = TSC_delta/APERF_delta/MPERF_delta/measurement_interval
      
      	need adjustment as above.
      
      No other metrics in turbostat need to be adjusted.
      
      Before:
      
           CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz
             -     550   24.84    2216    1512
             0    2191   98.73    2219    1514
             2       0    0.01    2130    1512
             1       9    0.43    2016    1512
             3       2    0.08    2016    1512
      
      After:
      
           CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz
             -     550   25.05    2198    1512
             0    2190   99.62    2199    1512
             2       0    0.01    2152    1512
             1       9    0.46    2000    1512
             3       2    0.10    2000    1512
      
      Note that in this example, the "Before" Bzy_MHz
      was reported as exceeding the 2200 max turbo rate.
      Also, even a pinned spin loop would not be reported
      as over 99% busy.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a2b7b749
    • H
      tools/power turbostat: KNL workaround for %Busy and Avg_MHz · b2b34dfe
      Hubert Chrzaniuk 提交于
      KNL increments APERF and MPERF every 1024 clocks.
      This is compliant with the architecture specification,
      which requires that only the ratio of APERF/MPERF need be valid.
      
      However, turbostat takes advantage of the fact that these
      two MSRs increment every un-halted clock
      at the actual and base frequency:
      
      AVG_MHz = APERF_delta/measurement_interval
      
      %Busy = MPERF_delta/TSC_delta
      
      This quirk is needed for these calculations to also work on KNL,
      which would otherwise show a value 1024x smaller than expected.
      Signed-off-by: NHubert Chrzaniuk <hubert.chrzaniuk@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b2b34dfe
    • L
      tools/power turbostat: IVB Xeon: fix --debug regression · 756357b8
      Len Brown 提交于
      Staring in Linux-4.3-rc1,
      commit 6fb3143b ("tools/power turbostat: dump CONFIG_TDP")
      touches MSR 0x648, which is not supported on IVB-Xeon.
      This results in "turbostat --debug" exiting on those systems:
      
      turbostat: /dev/cpu/2/msr offset 0x648 read failed: Input/output error
      
      Remove IVB-Xeon from the list of machines supporting with that MSR.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      756357b8
  7. 24 7月, 2015 1 次提交
  8. 16 7月, 2015 1 次提交
  9. 18 6月, 2015 2 次提交
  10. 28 5月, 2015 5 次提交
  11. 19 4月, 2015 7 次提交
  12. 14 4月, 2015 3 次提交
  13. 11 2月, 2015 1 次提交
  14. 10 2月, 2015 5 次提交
    • L
      tools/power turbostat: update parameters, documentation · d8af6f5f
      Len Brown 提交于
      Long format options added, though the short ones should still work.
      eg. the new "--Counter 0x10" is the same as the old "-C 0x10"
      
      Note this Incompatibility:
      Old:
      -v displayed verbose debug output
      
      New:
      -v and --version simpaly display version
      
      Additional parameters:
      -d and --debug display verbose debug output
      -h and --help display a help message
      
      Updated turbosat.8 man page accordingly.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d8af6f5f
    • 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