Skip to content
Snippets Groups Projects
  1. May 30, 2018
  2. Oct 13, 2016
  3. Sep 16, 2016
  4. Sep 13, 2016
    • Al Stone's avatar
      cpufreq: CPPC: Force reporting values in KHz to fix user space interface · ad38677d
      Al Stone authored
      
      When CPPC is being used by ACPI on arm64, user space tools such as
      cpupower report CPU frequency values from sysfs that are incorrect.
      
      What the driver was doing was reporting the values given by ACPI tables
      in whatever scale was used to provide them.  However, the ACPI spec
      defines the CPPC values as unitless abstract numbers.  Internal kernel
      structures such as struct perf_cap, in contrast, expect these values
      to be in KHz.  When these struct values get reported via sysfs, the
      user space tools also assume they are in KHz, causing them to report
      incorrect values (for example, reporting a CPU frequency of 1MHz when
      it should be 1.8GHz).
      
      The downside is that this approach has some assumptions:
      
         (1) It relies on SMBIOS3 being used, *and* that the Max Frequency
         value for a processor is set to a non-zero value.
      
         (2) It assumes that all processors run at the same speed, or that
         the CPPC values have all been scaled to reflect relative speed.
         This patch retrieves the largest CPU Max Frequency from a type 4 DMI
         record that it can find.  This may not be an issue, however, as a
         sampling of DMI data on x86 and arm64 indicates there is often only
         one such record regardless.  Since CPPC is relatively new, it is
         unclear if the ACPI ASL will always be written to reflect any sort
         of relative performance of processors of differing speeds.
      
         (3) It assumes that performance and frequency both scale linearly.
      
      For arm64 servers, this may be sufficient, but it does rely on
      firmware values being set correctly.  Hence, other approaches will
      be considered in the future.
      
      This has been tested on three arm64 servers, with and without DMI, with
      and without CPPC support.
      
      Signed-off-by: default avatarAl Stone <ahs3@redhat.com>
      Signed-off-by: default avatarPrashanth Prakash <pprakash@codeaurora.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ad38677d
  5. Sep 08, 2016
  6. Aug 30, 2016
  7. Apr 25, 2016
  8. Nov 23, 2015
  9. Nov 06, 2015
  10. Oct 12, 2015
Loading