17 Dec, 2014

1 commit


13 Nov, 2014

1 commit


12 Nov, 2014

3 commits

  • Signed-off-by: Jacob Pan
    Signed-off-by: Rafael J. Wysocki

    Jacob Pan
     
  • RAPL implementation on Atom has made some changes that are not compatible
    with Core CPUs. Specifically, it is different in the way units are computed
    as well as floor frequency is enforced.

    This patch uses the per CPU model functions to handle the differences. Intel
    Software Developers' Manual has also been updated to reflect the changes in
    Table 35-7 V3C.

    Signed-off-by: Ajay Thomas
    Signed-off-by: Jacob Pan
    Signed-off-by: Rafael J. Wysocki

    Jacob Pan
     
  • RAPL implementations may vary slightly between Core and Atom CPUs. There are
    also potential differences among generations of CPUs within the family.

    This patch adds a per model structure to abstract the differences such that
    variations can be handled cleanly.

    Signed-off-by: Jacob Pan
    Signed-off-by: Rafael J. Wysocki

    Jacob Pan
     

03 Sep, 2014

2 commits

  • Many CPUs do not support complete set of RAPL domains, as a
    result this detection failed message is very misleading and
    can be annoying.

    [ 5.082632] intel_rapl: RAPL domain core detection failed
    [ 5.088370] intel_rapl: RAPL domain uncore detection failed

    So lower the warning message to info and only print out the RAPL
    domains that are supported.

    Signed-off-by: Jacob Pan
    Signed-off-by: Rafael J. Wysocki

    Jacob Pan
     
  • I've confirmed that monitoring the package power usage as well as setting power
    limits appear to be working as expected. Supports the package and dram domains.

    Tested aginst cpu:

    Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz

    Signed-off-by: Jason Baron
    Acked-by: Jacob Pan
    Signed-off-by: Rafael J. Wysocki

    Jason Baron
     

01 May, 2014

2 commits

  • Add support for Broadwell model 0x3d and Haswell model (0x3c).

    Signed-off-by: Jacob Pan
    Signed-off-by: Rafael J. Wysocki

    Jacob Pan
     
  • Energy counters may roll slowly for some RAPL domains, checking all
    of them can be time consuming and takes unpredictable amount of time.
    Therefore, we relax the sanity check by only checking availability of the
    MSRs and non-zero value of the energy status counters. It has been shown
    sufficient for all the platforms tested to filter out inactive domains.

    Signed-off-by: Jacob Pan
    Acked-by: Durgadoss R
    Signed-off-by: Rafael J. Wysocki

    Jacob Pan
     

08 Apr, 2014

1 commit

  • Pull CPU hotplug notifiers registration fixes from Rafael Wysocki:
    "The purpose of this single series of commits from Srivatsa S Bhat
    (with a small piece from Gautham R Shenoy) touching multiple
    subsystems that use CPU hotplug notifiers is to provide a way to
    register them that will not lead to deadlocks with CPU online/offline
    operations as described in the changelog of commit 93ae4f978ca7f ("CPU
    hotplug: Provide lockless versions of callback registration
    functions").

    The first three commits in the series introduce the API and document
    it and the rest simply goes through the users of CPU hotplug notifiers
    and converts them to using the new method"

    * tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
    net/iucv/iucv.c: Fix CPU hotplug callback registration
    net/core/flow.c: Fix CPU hotplug callback registration
    mm, zswap: Fix CPU hotplug callback registration
    mm, vmstat: Fix CPU hotplug callback registration
    profile: Fix CPU hotplug callback registration
    trace, ring-buffer: Fix CPU hotplug callback registration
    xen, balloon: Fix CPU hotplug callback registration
    hwmon, via-cputemp: Fix CPU hotplug callback registration
    hwmon, coretemp: Fix CPU hotplug callback registration
    thermal, x86-pkg-temp: Fix CPU hotplug callback registration
    octeon, watchdog: Fix CPU hotplug callback registration
    oprofile, nmi-timer: Fix CPU hotplug callback registration
    intel-idle: Fix CPU hotplug callback registration
    clocksource, dummy-timer: Fix CPU hotplug callback registration
    drivers/base/topology.c: Fix CPU hotplug callback registration
    acpi-cpufreq: Fix CPU hotplug callback registration
    zsmalloc: Fix CPU hotplug callback registration
    scsi, fcoe: Fix CPU hotplug callback registration
    scsi, bnx2fc: Fix CPU hotplug callback registration
    scsi, bnx2i: Fix CPU hotplug callback registration
    ...

    Linus Torvalds
     

20 Mar, 2014

1 commit

  • Subsystems that want to register CPU hotplug callbacks, as well as perform
    initialization for the CPUs that are already online, often do it as shown
    below:

    get_online_cpus();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    register_cpu_notifier(&foobar_cpu_notifier);

    put_online_cpus();

    This is wrong, since it is prone to ABBA deadlocks involving the
    cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
    with CPU hotplug operations).

    Instead, the correct and race-free way of performing the callback
    registration is:

    cpu_notifier_register_begin();

    for_each_online_cpu(cpu)
    init_cpu(cpu);

    /* Note the use of the double underscored version of the API */
    __register_cpu_notifier(&foobar_cpu_notifier);

    cpu_notifier_register_done();

    Fix the intel-rapl code in the powercap driver by using this latter form
    of callback registration. But retain the calls to get/put_online_cpus(),
    since they also protect the function rapl_cleanup_data(). By nesting
    get/put_online_cpus() *inside* cpu_notifier_register_begin/done(), we avoid
    the ABBA deadlock possibility mentioned above.

    Cc: Srinivas Pandruvada
    Cc: Ingo Molnar
    Tested-by: Jacob Pan
    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     

14 Feb, 2014

2 commits


22 Dec, 2013

1 commit


05 Dec, 2013

1 commit

  • As per the documentation of powercap sysfs, energy_uj field is read only,
    if it can't be reset. Currently it always allows write but will fail,
    if there is no reset callback.
    Changing mode field, to read only if there is no reset callback.

    Signed-off-by: Srinivas Pandruvada
    Reported-by: Dirk Brandewie
    Signed-off-by: Rafael J. Wysocki

    Srinivas Pandruvada
     

05 Nov, 2013

1 commit


26 Oct, 2013

1 commit

  • The newly added power capping framework uses the obsolete .dev_attrs
    field of struct class. However this field will be removed in 3.13, so
    convert the code to use the .dev_groups field instead.

    Signed-off-by: Thierry Reding
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rafael J. Wysocki

    Thierry Reding
     

18 Oct, 2013

1 commit

  • The Intel Running Average Power Limit (RAPL) technology provides platform
    software with the ability to monitor, control, and get notifications on
    power usage.

    This feature is present in all Sandy Bridge and later Intel processors.
    Newer models allow more fine grained controls to be applied. In RAPL,
    power control is divided into domains, which include package, DRAM
    controller, CPU core (Power Plane 0), graphics uncore (power plane 1), etc.

    The purpose of this driver is to expose the RAPL settings to userspace.
    Overall, RAPL fits in the new powercap class driver in that platform
    level power capping controls are exposed via this generic interface.

    This driver is based on an earlier patch from Zhang Rui.

    However, while the previous work was mainly focused on thermal monitoring
    the focus here is on the usability from user space perspective.

    References: https://lkml.org/lkml/2011/5/26/93
    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jacob Pan
    Reviewed-by: Rafael J. Wysocki
    Signed-off-by: Rafael J. Wysocki

    Jacob Pan
     

17 Oct, 2013

1 commit

  • The power capping framework providing a consistent interface between the
    kernel and user space that allows power capping drivers to expose their
    settings to user space in a uniform way.
    The overall design of the framework is described in the documentation
    added by the previous patch in this series.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jacob Pan
    Reviewed-by: Rafael J. Wysocki
    Signed-off-by: Rafael J. Wysocki

    Srinivas Pandruvada