12 May, 2013

1 commit


01 May, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small
    code cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits)
    mm: Convert print_symbol to %pSR
    gfs2: Convert print_symbol to %pSR
    m32r: Convert print_symbol to %pSR
    iostats.txt: add easy-to-find description for field 6
    x86 cmpxchg.h: fix wrong comment
    treewide: Fix typo in printk and comments
    doc: devicetree: Fix various typos
    docbook: fix 8250 naming in device-drivers
    pata_pdc2027x: Fix compiler warning
    treewide: Fix typo in printks
    mei: Fix comments in drivers/misc/mei
    treewide: Fix typos in kernel messages
    pm44xx: Fix comment for "CONFIG_CPU_IDLE"
    doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"
    mmzone: correct "pags" to "pages" in comment.
    kernel-parameters: remove outdated 'noresidual' parameter
    Remove spurious _H suffixes from ifdef comments
    sound: Remove stray pluses from Kconfig file
    radio-shark: Fix printk "CONFIG_LED_CLASS"
    doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE
    ...

    Linus Torvalds
     

18 Apr, 2013

1 commit


31 Mar, 2013

1 commit


15 Mar, 2013

1 commit


19 Feb, 2013

1 commit

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (35 commits)
    PM idle: remove global declaration of pm_idle
    unicore32 idle: delete stray pm_idle comment
    openrisc idle: delete pm_idle
    mn10300 idle: delete pm_idle
    microblaze idle: delete pm_idle
    m32r idle: delete pm_idle, and other dead idle code
    ia64 idle: delete pm_idle
    cris idle: delete idle and pm_idle
    ARM64 idle: delete pm_idle
    ARM idle: delete pm_idle
    blackfin idle: delete pm_idle
    sparc idle: rename pm_idle to sparc_idle
    sh idle: rename global pm_idle to static sh_idle
    x86 idle: rename global pm_idle to static x86_idle
    APM idle: register apm_cpu_idle via cpuidle
    tools/power turbostat: display SMI count by default
    intel_idle: export both C1 and C1E
    cpuidle: remove vestage definition of cpuidle_state_usage.driver_data
    x86 idle: remove 32-bit-only "no-hlt" parameter, hlt_works_ok flag
    x86 idle: remove mwait_idle() and "idle=mwait" cmdline param
    ...

    Conflicts:
    arch/x86/kernel/process.c (with PM / tracing commit 43720bd)
    drivers/acpi/processor_idle.c (with ACPICA commit 4f84291)

    Rafael J. Wysocki
     

14 Feb, 2013

1 commit

  • 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: Len Brown

    Len Brown
     

09 Feb, 2013

2 commits


06 Feb, 2013

1 commit


19 Dec, 2012

1 commit

  • Pull powertool update from Len Brown:
    "This updates the tree w/ the latest version of turbostat, which
    reports temperature and - on SNB and later - Watts."

    Fix up semantic merge conflict as per Len.

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    tools: Allow tools to be installed in a user specified location
    tools/power: turbostat: make Makefile a bit more capable
    tools/power x86_energy_perf_policy: close /proc/stat in for_every_cpu()
    tools/power turbostat: v3.0: monitor Watts and Temperature
    tools/power turbostat: fix output buffering issue
    tools/power turbostat: prevent infinite loop on migration error path
    x86 power: define RAPL MSRs
    tools/power/x86/turbostat: share kernel MSR #defines

    Linus Torvalds
     

30 Nov, 2012

5 commits

  • When building x86_energy_perf_policy or turbostat within the confines of
    a packaging system such as RPM, we need to be able to have it install to
    the buildroot and not the root filesystem of the build machine. This
    adds a DESTDIR variable that when set will act as a prefix for the
    install location of these tools.

    Signed-off-by: Josh Boyer
    Signed-off-by: Len Brown

    Josh Boyer
     
  • 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: Mark Asselstine
    Signed-off-by: Len Brown

    Mark Asselstine
     
  • Instead of returning out of for_every_cpu() we should break out of the loop=
    which will then tidy up correctly by closing the file /proc/stat.

    Signed-off-by: Colin Ian King
    Signed-off-by: Len Brown

    Colin Ian King
     
  • 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: Len Brown

    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: Len Brown

    Len Brown
     

28 Nov, 2012

8 commits

  • Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Thomas Renninger
     
  • If an MSR based monitor is run in parallel this is not needed. This is the
    default case on all/most Intel machines.

    But when only sysfs info is read via cpupower monitor -m Idle_Stats (typically
    the case for non root users) or when other monitors are PCI based (AMD),
    Idle_Stats, read from sysfs can be totally bogus:

    cpupower monitor -m Idle_Stats
    PKG |CORE|CPU | POLL | C1-N | C3-N | C6-N
    0| 0| 0| 0.00| 0.00| 0.24| 99.81
    0| 0| 32| 0.00| 0.00| 0.00| 100.7
    ...
    0| 17| 20| 0.00| 0.00| 0.00| 173.1
    0| 17| 52| 0.00| 0.00| 0.07| 173.0
    0| 18| 68| 0.00| 0.00| 0.00| 0.00
    0| 18| 76| 0.00| 0.00| 0.00| 0.00
    ...

    With the -c option all cores are woken up and the kernel
    did update cpuidle statistics before reading out sysfs.
    This causes some overhead. Therefore avoid if possible, use
    if needed:

    cpupower monitor -c -m Idle_Stats
    PKG |CORE|CPU | POLL | C1-N | C3-N | C6-N
    0| 0| 0| 0.00| 0.00| 0.00| 100.2
    0| 0| 32| 0.00| 0.00| 0.00| 100.2
    ...
    0| 8| 8| 0.00| 0.00| 0.00| 99.82
    0| 8| 40| 0.00| 0.00| 0.00| 99.81
    0| 9| 24| 0.00| 0.00| 0.00| 100.3
    0| 9| 56| 0.00| 0.00| 0.00| 100.2
    0| 16| 4| 0.00| 0.00| 0.00| 99.75
    0| 16| 36| 0.00| 0.00| 0.00| 99.38
    ...

    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Thomas Renninger
     
  • The pkgs member of cpupower_topology is being used as the number of
    cpu packages. As the comment in get_cpu_topology notes, the package ids
    are not guaranteed to be contiguous. So, simply setting pkgs to the value
    of the highest physical_package_id doesn't actually provide a count of
    the number of cpu packages. Instead, calculate pkgs by setting it to
    the number of distinct physical_packge_id values which is pretty easy
    to do after the core_info structs are sorted. Calculating pkgs this
    way also has the nice benefit of getting rid of a sign comparison warning
    that GCC 4.6 was reporting.

    Signed-off-by: Palmer Cox
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Palmer Cox
     
  • The cpu_info member of cpupower_topology was being declared as an unnamed
    structure. This member was then being malloced using the size of the
    parent cpupower_topology * the number of cpus. This works
    because cpu_info is smaller than cpupower_topology. However, there is
    no guarantee that will always be the case. Making cpu_info its own
    top level structure (named cpuid_core_info) allows for mallocing the actual
    size of this structure. This also lets us get rid of a redefinition of
    the structure in topology.c with slightly different field names.

    Signed-off-by: Palmer Cox
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Palmer Cox
     
  • Fix a variety of issues with sysfs_topology_read_file:
    * The return value of sysfs_topology_read_file function was not properly
    being checked for failure.
    * The function was reading int valued sysfs variables and then returning
    their value. So, even if a function was trying to check the return value
    of this function, a caller would not be able to tell an failure code apart
    from reading a negative value. This also conflicted with the comment on the
    function which said that a return value of 0 indicated success.
    * The function was parsing int valued sysfs values with strtoul instead of
    strtol.
    * The function was non-static even though it was only used in the
    file it was declared in.

    Signed-off-by: Palmer Cox
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Palmer Cox
     
  • Fix minor warnings reported with GCC 4.6:
    * The sysfs_write_file function is unused - remove it.
    * The pr_mon_len in the print_header function is unsed - remove it.

    Signed-off-by: Palmer Cox
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Palmer Cox
     
  • The files generated by the Makefiles in the debug directories aren't listed
    in the .gitignore file in the root of the cpupower tool which causes these
    files to show up in the output of 'git status'.

    Signed-off-by: Palmer Cox
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Palmer Cox
     
  • The clean targets from the cpupower tools' Makefiles use brace expansion to
    remove some generated files. However, the default shells on many systems do
    not support this feature resulting in some generated files not being removed
    by clean.

    Signed-off-by: Palmer Cox
    Signed-off-by: Thomas Renninger
    Signed-off-by: Rafael J. Wysocki

    Palmer Cox
     

27 Nov, 2012

1 commit

  • 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: Len Brown

    Len Brown
     

24 Nov, 2012

1 commit


01 Nov, 2012

2 commits


09 Oct, 2012

1 commit


08 Oct, 2012

1 commit

  • Pull kbuild fixes from Michal Marek:
    "Here are two fixes I intended to send after v3.6-rc7, but failed to do
    so. So please pull them for v3.7-rc1 and they will be picked up by
    stable.

    The first one fixes gcc -x syntax in various build-time
    tests, which icecream and possible other gcc wrappers did not
    understand (and yes, icecream is going to be fixed as well).

    The second one fixes make tar-pkg so that unpacking the tarball does
    not replace the /lib -> /usr/lib symlink on recent Fedora releases."

    * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kbuild: Fix gcc -x syntax
    kbuild: Do not package /boot and /lib in make tar-pkg

    Linus Torvalds
     

07 Oct, 2012

2 commits


03 Oct, 2012

1 commit

  • The correct syntax for gcc -x is "gcc -x assembler", not
    "gcc -xassembler". Even though the latter happens to work, the former
    is what is documented in the manual page and thus what gcc wrappers
    such as icecream do expect.

    This isn't a cosmetic change. The missing space prevents icecream from
    recognizing compilation tasks it can't handle, leading to silent kernel
    miscompilations.

    Besides me, credits go to Michael Matz and Dirk Mueller for
    investigating the miscompilation issue and tracking it down to this
    incorrect -x parameter syntax.

    Signed-off-by: Jean Delvare
    Acked-by: Ingo Molnar
    Cc: stable@vger.kernel.org
    Cc: Bernhard Walle
    Cc: Michal Marek
    Cc: Ralf Baechle
    Signed-off-by: Michal Marek

    Jean Delvare
     

28 Sep, 2012

1 commit


27 Sep, 2012

5 commits

  • -m MSR# prints the specified MSR in 32-bit format
    -M MSR# prints the specified MSR in 64-bit format

    Signed-off-by: Len Brown

    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: Len Brown

    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: Len Brown

    Len Brown
     
  • MSR_TSC is no longer needed because
    we now use RDTSC directly.

    Signed-off-by: Len Brown

    Len Brown
     
  • This fix is required to run on IVB Xeon,
    which previously had an incorrect cpuid model number listed.

    Signed-off-by: Len Brown

    Len Brown
     

25 Sep, 2012

1 commit