1. 24 8月, 2018 1 次提交
  2. 30 5月, 2018 1 次提交
    • A
      cpupower : Fix header name to read idle state name · f9652d5c
      Abhishek Goel 提交于
      The names of the idle states in the output of cpupower monitor command are
      truncated to 4 characters. On POWER9, this creates ambiguity as the states
      are named "stop0", "stop1", etc.
      
      root:~# cpupower monitor
                    |Idle_Stats
      PKG |CORE|CPU | snoo | stop | stop | stop | stop | stop | stop
         0|   0|   0|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  1.90
         0|   0|   1|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
         0|   0|   2|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
         0|   0|   3|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
      
      This patch modifies the output to print the state name that results in a
      legible output. The names will be printed with atmost 1 padding in left.
      
      root:~# cpupower monitor
                    | Idle_Stats
       PKG|CORE| CPU|snooze|stop0L| stop0|stop1L| stop1|stop2L| stop2
         0|   0|   0|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.72
         0|   0|   1|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
         0|   0|   2|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
         0|   0|   3|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
      
      This patch does not affect the output for intel.
      Output for intel before applying the patch:
      
      root:~# cpupower monitor
          |Idle_Stats
      CPU | POLL | C1-S | C1E- | C3-S | C6-S | C7s- | C8-S | C9-S | C10-
         0|  0.00|  0.14|  0.39|  0.35|  7.41|  0.00| 17.67|  1.01| 70.03
         2|  0.00|  0.19|  0.47|  0.10|  6.50|  0.00| 29.66|  2.17| 58.07
         1|  0.00|  0.11|  0.50|  1.50|  9.11|  0.18| 18.19|  0.40| 66.63
         3|  0.00|  0.67|  0.42|  0.03|  5.84|  0.00| 12.58|  0.77| 77.14
      
      Output for intel after applying the patch:
      
      root:~# cpupower monitor
          | Idle_Stats
       CPU| POLL | C1-S | C1E- | C3-S | C6-S | C7s- | C8-S | C9-S | C10-
         0|  0.03|  0.33|  1.01|  0.27|  3.03|  0.00| 19.18|  0.00| 71.24
         2|  0.00|  1.58|  0.58|  0.42|  8.55|  0.09| 21.11|  0.99| 63.32
         1|  0.00|  1.26|  0.88|  0.43|  9.00|  0.02|  7.78|  4.65| 71.91
         3|  0.00|  0.30|  0.42|  0.06| 13.62|  0.21| 30.29|  0.00| 52.45
      Signed-off-by: NAbhishek Goel <huntbag@linux.vnet.ibm.com>
      Signed-off-by: NShuah Khan (Samsung OSG) <shuah@kernel.org>
      f9652d5c
  3. 11 5月, 2018 1 次提交
  4. 15 12月, 2017 1 次提交
  5. 18 11月, 2017 1 次提交
    • B
      kbuild: /bin/pwd -> pwd · 16f8259c
      Bjørn Forsman 提交于
      Most places use pwd and rely on $PATH lookup. Moving the remaining
      absolute path /bin/pwd users over for consistency.
      
      Also, a reason for doing /bin/pwd -> pwd instead of the other way around
      is because I believe build systems should make little assumptions on
      host filesystem layout. Case in point, we do this kind of patching
      already in NixOS.
      
      Ref. commit 028568d8
      ("kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd)").
      Signed-off-by: NBjørn Forsman <bjorn.forsman@gmail.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      16f8259c
  6. 15 11月, 2017 2 次提交
  7. 10 11月, 2017 2 次提交
    • P
      tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore · 69b6f8a9
      Prarit Bhargava 提交于
      Commit ac5a181d ("cpupower: Add cpuidle parts into library") added
      libcpupower.so.0.0.1 which should be hidden from git commands.  This
      patch changes the ignore to all libcpupower.so.* .
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      69b6f8a9
    • P
      tools/power/cpupower: Add 64 bit library detection · d4dbfa4b
      Prarit Bhargava 提交于
      The kernel-tools-lib rpm is installing the library to /usr/lib64, and not
      /usr/lib as the cpupower Makefile is doing in the kernel tree.  This
      resulted in a conflict between the two libraries.  After looking at how
      other tools installed libraries, and looking at the perf code in
      tools/perf it looks like installing to /usr/lib64 for 64-bit arches is the
      correct thing to do.
      
      Checks with 'ldd cpupower' on SLES, RHEL, Fedora, and Ubuntu result in
      the correct binary AFAICT:
      
      [root@testsystem cpupower]# ldd cpupower | grep cpupower
              libcpupower.so.0 => /lib64/libcpupower.so.0 (0x00007f1dab447000)
      
      Commit ac5a181d ("cpupower: Add cpuidle parts into library") added a
      new cpupower library version.  On Fedora, executing the cpupower binary
      then resulted in this error
      
      [root@testsystem cpupower]# ./cpupower monitor
      ./cpupower: symbol lookup error: ./cpupower: undefined symbol:
      get_cpu_topology
      
      64-bit libraries should be installed to /usr/lib64, and other libraries
      should be installed to /usr/lib.
      
      This code was taken from the perf Makefile.config which supports /usr/lib
      and /usr/lib64.
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      d4dbfa4b
  8. 03 11月, 2017 1 次提交
    • P
      cpupower: Fix no-rounding MHz frequency output · 9da779c3
      Prarit Bhargava 提交于
      'cpupower frequency-info -ln' returns kHz values on systems with MHz range
      minimum CPU frequency range.  For example, on a 800MHz to 4.20GHz system
      the command returns
      
      hardware limits: 800000 MHz - 4.200000 GHz
      
      The code that causes this error can be removed.  The next else if clause
      will handle the output correctly such that
      
      hardware limits: 800.000 MHz - 4.200000 GHz
      
      is displayed correctly.
      
      [v2]: Remove two lines instead of fixing broken code.
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Cc: Thomas Renninger <trenn@suse.com>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Reviewed-by: NStafford Horne <shorne@gmail.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      9da779c3
  9. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  10. 07 10月, 2017 1 次提交
    • M
      kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd) · 028568d8
      Masahiro Yamada 提交于
      I thought commit 8e9b4667 ("kbuild: use $(abspath ...) instead of
      $(shell cd ... && /bin/pwd)") was a safe conversion, but it changed
      the behavior.
      
      $(abspath ...) / $(realpath ...) does not expand shell special
      characters, such as '~'.
      
      Here is a simple Makefile example:
      
        ---------------->8----------------
        $(info /bin/pwd: $(shell cd ~/; /bin/pwd))
        $(info abspath: $(abspath ~/))
        $(info realpath: $(realpath ~/))
        all:
                @:
        ---------------->8----------------
      
        $ make
        /bin/pwd: /home/masahiro
        abspath: /home/masahiro/workspace/~
        realpath:
      
      This can be a real problem if 'make O=~/foo' is invoked from another
      Makefile or primitive shell like dash.
      
      This commit partially reverts 8e9b4667.
      
      Fixes: 8e9b4667 ("kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)")
      Reported-by: NJulien Grall <julien.grall@arm.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NJulien Grall <julien.grall@arm.com>
      028568d8
  11. 01 9月, 2017 1 次提交
    • M
      kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd) · 8e9b4667
      Masahiro Yamada 提交于
      Kbuild conventionally uses $(shell cd ... && /bin/pwd) idiom to get
      the absolute path of the directory because GNU Make 3.80, the minimal
      supported version at that time, did not support $(abspath ...) or
      $(realpath ...).
      
      Commit 37d69ee3 ("docs: bump minimal GNU Make version to 3.81")
      dropped the GNU Make 3.80 support, so we are now allowed to use those
      make-builtin helpers.
      
      This conversion will provide better portability without relying on
      the pwd command or its location /bin/pwd.
      
      I am intentionally using $(realpath ...) instead $(abspath ...) in
      some places.  The difference between the two is $(realpath ...)
      returns an empty string if the given path does not exist.  It is
      convenient in places where we need to error-out if the makefile fails
      to create an output directory.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      8e9b4667
  12. 31 7月, 2017 1 次提交
    • P
      tools/power/cpupower: allow running without cpu0 · d0e4a193
      Prarit Bhargava 提交于
      Linux-3.7 added CONFIG_BOOTPARAM_HOTPLUG_CPU0,
      allowing systems to offline cpu0.
      
      But when cpu0 is offline, cpupower monitor will not display all
      processor and Mperf information:
      
      [root@intel-skylake-dh-03 cpupower]# ./cpupower monitor
      WARNING: at least one cpu is offline
          |Idle_Stats
      CPU | POLL | C1-S | C1E- | C3-S | C6-S | C7s- | C8-S
         4|  0.00|  0.00|  0.00|  0.00|  0.90|  0.00| 96.13
         1|  0.00|  0.00|  5.49|  0.00|  0.01|  0.00| 92.26
         5|  0.00|  0.00|  0.00|  0.00|  0.46|  0.00| 99.50
         2| 45.42|  0.00|  0.00|  0.00| 22.94|  0.00| 28.84
         6|  0.00| 37.54|  0.00|  0.00|  0.00|  0.00|  0.00
         3|  0.00|  0.00|  0.00|  0.00|  0.30|  0.00| 91.99
         7|  0.00|  0.00|  0.00|  0.00|  4.70|  0.00|  0.70
      
      This patch replaces the hard-coded use of cpu0 in cpupower with the
      current cpu, allowing it to run without a cpu0.
      
      After the patch is applied,
      
      [root@intel-skylake-dh-03 cpupower]# ./cpupower monitor
      WARNING: at least one cpu is offline
          |Nehalem                    || Mperf              || Idle_Stats
      CPU | C3   | C6   | PC3  | PC6  || C0   | Cx   | Freq || POLL | C1-S | C1E- | C3-S | C6-S | C7s- | C8-S
         4|  0.01|  1.27|  0.00|  0.00||  0.04| 99.96|  3957||  0.00|  0.00|  0.00|  0.00|  1.43|  0.00| 98.52
         1|  0.00| 98.82|  0.00|  0.00||  0.05| 99.95|  3361||  0.00|  0.00|  0.01|  0.00|  0.03|  0.00| 99.88
         5|  0.00| 98.82|  0.00|  0.00||  0.09| 99.91|  3917||  0.00|  0.00|  0.00|  0.00| 99.38|  0.00|  0.50
         2|  0.33|  0.00|  0.00|  0.00||  0.00|100.00|  3890||  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|100.00
         6|  0.33|  0.00|  0.00|  0.00||  0.01| 99.99|  3903||  0.00|  0.00|  0.00|  0.00|  0.00|  0.00| 99.99
         3|  0.01|  0.71|  0.00|  0.00||  0.06| 99.94|  3678||  0.00|  0.00|  0.00|  0.00|  0.80|  0.00| 99.13
         7|  0.01|  0.71|  0.00|  0.00||  0.03| 99.97|  3538||  0.00|  0.69| 11.70|  0.00|  0.00|  0.00| 87.57
      
      There are some minor cleanups included in this patch.
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: NThomas Renninger <trenn@suse.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d0e4a193
  13. 27 6月, 2017 2 次提交
  14. 13 4月, 2017 1 次提交
  15. 20 1月, 2017 1 次提交
    • S
      cpupower: Restore format of frequency-info limit · 4da39ceb
      Stafford Horne 提交于
      The intel_pstate kselftest expects that the output of
      `cpupower frequency-info -l | tail -1 | awk ' { print $1 } '`
      to get frequency limits.  This does not work after the following two
      changes.
      
       - 562e5f1a: rework the "cpupower frequency-info" command
         (Jacob Tanenbaum) removed parsable limit output
       - ce512b84: Do not analyse offlined cpus
         (Thomas Renninger) added newline to break limit parsing more
      
      This change preserves human readable output if wanted as well as
      parsable output for scripts/tests.
      
      Cc: Thomas Renninger <trenn@suse.com>
      Cc: "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: linux-pm@vger.kernel.org
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      4da39ceb
  16. 11 12月, 2016 1 次提交
  17. 01 11月, 2016 1 次提交
  18. 05 5月, 2016 1 次提交
  19. 28 4月, 2016 6 次提交
  20. 19 1月, 2016 1 次提交
  21. 03 12月, 2015 5 次提交
  22. 02 11月, 2015 4 次提交
  23. 29 8月, 2015 1 次提交
  24. 24 7月, 2015 1 次提交
  25. 06 7月, 2015 1 次提交