Re: [PATCH] cpupower: Correct return type of cpu_power_is_cpu_online in cpufreq

2016-09-23 Thread Shilpasri G Bhat
Hi, On 09/09/2016 10:55 PM, Laura Abbott wrote: > When converting to a shared library in ac5a181d065d ("cpupower: Add > cpuidle parts into library"), cpu_freq_cpu_exists was converted to > cpupower_is_cpu_online. cpu_req_cpu_exists returned 0 on success and > -ENOSYS on failure whereas cpupower_is

Re: [PATCH] hwmon: (ibmpowernv) Add current(A) sensors

2017-06-19 Thread Shilpasri G Bhat
Hi Cedric, On 06/19/2017 06:22 PM, Cédric Le Goater wrote: > On 06/19/2017 11:25 AM, Shilpasri G Bhat wrote: >> This patch exports current(A) sensors in inband sensors copied to >> main memory by OCC. >> >> Signed-off-by: Shilpasri G Bhat >> --- >> drivers

[PATCH V2 0/2] hwmon: (ibmpowernv) Add support for current(A) sensors

2017-06-19 Thread Shilpasri G Bhat
The first patch from Cedric in the patchset cleans up the driver to provide a neater way to define new sensor types. The second patch adds current sensor. Cédric Le Goater (1): hwmon: (ibmpowernv) introduce a legacy_compatibles array Shilpasri G Bhat (1): hwmon: (ibmpowernv) Add current(A

[PATCH V2 1/2] hwmon: (ibmpowernv) introduce a legacy_compatibles array

2017-06-19 Thread Shilpasri G Bhat
uce new sensor types. Let's introduce two different arrays (legacy and current) to make things easier for new sensor types. Signed-off-by: Cédric Le Goater Tested-by: Shilpasri G Bhat --- drivers/hwmon/ibmpowernv.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions

[PATCH V2 2/2] hwmon: (ibmpowernv) Add current(A) sensor

2017-06-19 Thread Shilpasri G Bhat
This patch exports current(A) sensors in inband sensors copied to main memory by OCC. Signed-off-by: Shilpasri G Bhat --- Changes from V1: - Rebased on top of Cedric's patch to remove legay-compatible type for the current(A) sensor. drivers/hwmon/ibmpowernv.c | 4 +++- 1 file chang

Re: [PATCH V2 1/2] hwmon: (ibmpowernv) introduce a legacy_compatibles array

2017-06-20 Thread Shilpasri G Bhat
On 06/20/2017 11:36 AM, Cédric Le Goater wrote: > On 06/20/2017 07:08 AM, Shilpasri G Bhat wrote: >> From: Cédric Le Goater >> >> Today, the type of a PowerNV sensor system is determined with the >> "compatible" property for legacy Firmwares and with the

[PATCH V4 0/2] Add support for OCC command/response interface

2017-06-21 Thread Shilpasri G Bhat
/007705.html Shilpasri G Bhat (2): powerpc/powernv: Get a unique token for async completions powerpc/powernv : Add support for OPAL-OCC command/response interface arch/powerpc/include/asm/opal-api.h| 41 +++- arch/powerpc/include/asm/opal.h| 4 + arch/powerpc

[PATCH V4 1/2] powerpc/powernv: Get a unique token for async completions

2017-06-21 Thread Shilpasri G Bhat
This patch adds support to get a unique token for async completion requests. This will be used for creating non-repititive request handles for consecutive requests in OPAL-OCC command/response interface. Signed-off-by: Shilpasri G Bhat --- - No changes from V3 arch/powerpc/include/asm/opal.h

[PATCH V4 2/2] powerpc/powernv : Add support for OPAL-OCC command/response interface

2017-06-21 Thread Shilpasri G Bhat
between OCC and the host. Signed-off-by: Shilpasri G Bhat --- - Hold occ->cmd_in_progress in read() - Reset occ->rsp_consumed if copy_to_user() fails arch/powerpc/include/asm/opal-api.h| 41 +++- arch/powerpc/include/asm/opal.h| 3 + arch/powerpc/platforms/p

Re: [PATCH V4 2/2] powerpc/powernv : Add support for OPAL-OCC command/response interface

2017-06-21 Thread Shilpasri G Bhat
Hi Cyril, On 06/22/2017 06:28 AM, Cyril Bur wrote: > On Wed, 2017-06-21 at 13:36 +0530, Shilpasri G Bhat wrote: >> In P9, OCC (On-Chip-Controller) supports shared memory based >> commad-response interface. Within the shared memory there is an OPAL >> command buffer and OCC

[PATCH V5] hwmon: (ibmpowernv) Add highest/lowest attributes to sensors

2017-05-28 Thread Shilpasri G Bhat
OCC provides historical minimum and maximum value for the sensor readings. This patch exports them as highest and lowest attributes for the inband sensors copied by OCC to main memory. Signed-off-by: Shilpasri G Bhat --- Changes from V4: - Got rid of 'len' variable in populate_a

[PATCH] cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin

2018-01-11 Thread Shilpasri G Bhat
ernv: Replacing pstate_id with frequency table index") Reported-by: Alvin Wang Signed-off-by: Shilpasri G Bhat --- drivers/cpufreq/powernv-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpu

[PATCH 0/3] Add support to disable sensor groups in P9

2018-03-22 Thread Shilpasri G Bhat
://lists.ozlabs.org/pipermail/skiboot/2018-March/010812.html Shilpasri G Bhat (3): powernv:opal-sensor-groups: Add support to enable sensor groups hwmon: ibmpowernv: Add attributes to enable/disable sensor groups powernv: opal-sensor-groups: Add attributes to disable/enable sensors .../ABI

[PATCH 3/3] powernv: opal-sensor-groups: Add attributes to disable/enable sensors

2018-03-22 Thread Shilpasri G Bhat
This patch provides support to disable and enable plaform specific sensor groups like performance, utilization and frequency. Signed-off-by: Shilpasri G Bhat --- .../ABI/testing/sysfs-firmware-opal-sensor-groups | 34 + .../powerpc/platforms/powernv/opal-sensor-groups.c | 80

[PATCH 1/3] powernv:opal-sensor-groups: Add support to enable sensor groups

2018-03-22 Thread Shilpasri G Bhat
Adds support to enable/disable a sensor group at runtime. This can be used to select the sensor groups that needs to be copied to main memory by OCC. Sensor groups like power, temperature, current, voltage, frequency, utilization can be enabled/disabled at runtime. Signed-off-by: Shilpasri G Bhat

[PATCH 2/3] hwmon: ibmpowernv: Add attributes to enable/disable sensor groups

2018-03-22 Thread Shilpasri G Bhat
. This patch provides support for enabling/disabling the sensor groups like power, temperature, current and voltage. This patch adds new sysfs attributes to disable and enable them. Signed-off-by: Shilpasri G Bhat --- - Should the new attributes be added to hwmon_chip_attrs[]? Documentation/hwmon

[PATCH v2 1/2] powernv:opal-sensor-groups: Add support to enable sensor groups

2018-07-04 Thread Shilpasri G Bhat
Adds support to enable/disable a sensor group at runtime. This can be used to select the sensor groups that needs to be copied to main memory by OCC. Sensor groups like power, temperature, current, voltage, frequency, utilization can be enabled/disabled at runtime. Signed-off-by: Shilpasri G Bhat

[PATCH v2 0/2] hwmon: Add attributes to enable/disable sensors

2018-07-04 Thread Shilpasri G Bhat
This patch series adds new attribute to enable or disable a sensor in runtime. v1 : https://lkml.org/lkml/2018/3/22/214 Shilpasri G Bhat (2): powernv:opal-sensor-groups: Add support to enable sensor groups hwmon: ibmpowernv: Add attributes to enable/disable sensor groups Documentation

Re: [PATCH 0/3] Add support to disable sensor groups in P9

2018-05-16 Thread Shilpasri G Bhat
On 05/15/2018 08:32 PM, Guenter Roeck wrote: > On Thu, Mar 22, 2018 at 04:24:32PM +0530, Shilpasri G Bhat wrote: >> This patch series adds support to enable/disable OCC based >> inband-sensor groups at runtime. The environmental sensor groups are >> managed in HWMON and t

Re: [PATCH 0/3] Add support to disable sensor groups in P9

2018-05-17 Thread Shilpasri G Bhat
On 05/17/2018 06:08 PM, Guenter Roeck wrote: > On 05/16/2018 11:10 PM, Shilpasri G Bhat wrote: >> >> >> On 05/15/2018 08:32 PM, Guenter Roeck wrote: >>> On Thu, Mar 22, 2018 at 04:24:32PM +0530, Shilpasri G Bhat wrote: >>>> This patch series adds suppo

[PATCH 1/2] powerpc/powernv: Add definition of OPAL_MSG_OCC message type

2015-04-22 Thread Shilpasri G Bhat
for reducing Pmax is also queued along with the message. Additional opal message type OPAL_MSG_PRD is added to maintain compatibility between opal and kernel definition of opal_message_type. Signed-off-by: Shilpasri G Bhat --- arch/powerpc/include/asm/opal-api.h | 8 1 file changed, 8

[PATCH 2/2] cpufreq: powernv: Register for OCC related opal_message notification

2015-04-22 Thread Shilpasri G Bhat
power or thermal reasons. We are also notified of unthrottling after an OCC reset or if OCC restores Pmax on the chip. Signed-off-by: Shilpasri G Bhat CC: "Rafael J. Wysocki" CC: Viresh Kumar CC: linux...@vger.kernel.org --- drivers/cpufreq/powernv-cpuf

Re: [PATCH v3] cpufreq: powernv: Report cpu frequency throttling

2015-04-01 Thread Shilpasri G Bhat
Hi Rafael, On 03/31/2015 12:45 AM, Rafael J. Wysocki wrote: > On Friday, March 27, 2015 01:10:46 PM Viresh Kumar wrote: >> On 27 March 2015 at 13:02, Shilpasri G Bhat >> wrote: >>> The power and thermal safety of the system is taken care by an >>> On-Chip-Co

[PATCH v4] cpufreq: powernv: Report cpu frequency throttling

2015-04-01 Thread Shilpasri G Bhat
. The current status of the core is read from Power Management Status Register(PMSR) to check if any of the throttling condition is occurred and the appropriate throttling message is reported. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy --- Changes from V3: -Added macros for shifting

Re: [PATCH 2/2] cpufreq: powernv: Register for OCC related opal_message notification

2015-04-27 Thread Shilpasri G Bhat
Hi Viresh, On 04/27/2015 10:02 AM, Viresh Kumar wrote: > On 22 April 2015 at 22:34, Shilpasri G Bhat > wrote: >> diff --git a/drivers/cpufreq/powernv-cpufreq.c >> b/drivers/cpufreq/powernv-cpufreq.c > >> +static char throttle_reason[6][50] = { "No throttling&quo

Re: [PATCH 2/2] cpufreq: powernv: Register for OCC related opal_message notification

2015-04-27 Thread Shilpasri G Bhat
Hi Preeti, On 04/23/2015 05:28 PM, Preeti U Murthy wrote: > Hi Shilpa, > > On 04/22/2015 10:34 PM, Shilpasri G Bhat wrote: >> OCC is an On-Chip-Controller which takes care of power and thermal >> safety of the chip. During runtime due to power failure or >> overtempe

[PATCH v2 0/2] powernv: cpufreq: Report frequency throttle by OCC

2015-04-27 Thread Shilpasri G Bhat
limit the max allowed frequency. The patchset will report such conditions so as to keep the user informed about reason for the drop in performance of workloads when frequency is throttled. Shilpasri G Bhat (2): powerpc/powernv: Add definition of OPAL_MSG_OCC message type cpufreq: powernv: Register

[PATCH v2 2/2] cpufreq: powernv: Register for OCC related opal_message notification

2015-04-27 Thread Shilpasri G Bhat
power or thermal reasons. We are also notified of unthrottling after an OCC reset or if OCC restores Pmax on the chip. Signed-off-by: Shilpasri G Bhat CC: "Rafael J. Wysocki" CC: Viresh Kumar CC: Preeti U Murthy CC: linux...@vger.kernel.org --- Changes from v1: - Add macros to define

[PATCH v2 1/2] powerpc/powernv: Add definition of OPAL_MSG_OCC message type

2015-04-27 Thread Shilpasri G Bhat
opal_message_type. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy --- Changes from v1: - Update the commit changelog arch/powerpc/include/asm/opal-api.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h

Re: [PATCH v2 2/2] cpufreq: powernv: Register for OCC related opal_message notification

2015-04-28 Thread Shilpasri G Bhat
Hi Viresh, On 04/28/2015 12:18 PM, Viresh Kumar wrote: > On 28 April 2015 at 11:53, Shilpasri G Bhat > wrote: > >> Changes from v1: >> - Add macros to define OCC_RESET, OCC_LOAD and OCC_THROTTLE >> - Define a structure to store chip id, chip mask which has bits set &

Re: [PATCH v2 2/2] cpufreq: powernv: Register for OCC related opal_message notification

2015-04-28 Thread Shilpasri G Bhat
On 04/28/2015 02:23 PM, Viresh Kumar wrote: > On 28 April 2015 at 13:48, Shilpasri G Bhat > wrote: >> My bad I haven't added explicit comment to state reason behind this change. >> >> I modified the definition of *throttle_check() to match the function >

[PATCH] cpuidle: powernv/pseries: Decrease the snooze residency

2015-05-29 Thread Shilpasri G Bhat
the cpu to promote it to deeper idle states. Signed-off-by: Shilpasri G Bhat --- drivers/cpuidle/cpuidle-powernv.c | 12 drivers/cpuidle/cpuidle-pseries.c | 11 +++ 2 files changed, 23 insertions(+) diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle

[PATCH v2] cpuidle: powernv/pseries: Auto-promotion of snooze to deeper idle state

2015-06-18 Thread Shilpasri G Bhat
the cpu to promote it to deeper idle states. Signed-off-by: Shilpasri G Bhat --- Changes from v1: -Modified commit message drivers/cpuidle/cpuidle-powernv.c | 12 drivers/cpuidle/cpuidle-pseries.c | 11 +++ 2 files changed, 23 insertions(+) diff --git a/drivers/cpuidle

[PATCH] cpufreq: powernv: Remove global pstate ramp-down timer in POWER9

2018-04-24 Thread Shilpasri G Bhat
POWER9 doesnot support global pstate requests for the chip. So remove the timer logic which slowly ramps down the global pstate in P9 platforms. Signed-off-by: Shilpasri G Bhat --- drivers/cpufreq/powernv-cpufreq.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions

[PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Shilpasri G Bhat
652f13 (timers, cpufreq/powernv: Initialize the gpstate timer as pinned) Cc: [4.8+] Reported-by: Nicholas Piggin Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Shilpasri G Bhat --- Changes from V1: - Remove smp_call in the pstate handler. drivers/cpufreq/powernv-cpufreq.

Re: [PATCH V2] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Shilpasri G Bhat
Hi, On 04/25/2018 02:47 PM, Viresh Kumar wrote: > On 25-04-18, 14:32, Shilpasri G Bhat wrote: >> gpstate_timer_handler() uses synchronous smp_call to set the pstate >> on the requested core. This causes the below hard lockup: >> >> [c03fe566b320] [c01d534

[PATCH V3] cpufreq: powernv: Fix the hardlockup by synchronus smp_call in timer interrupt

2018-04-25 Thread Shilpasri G Bhat
652f13 (timers, cpufreq/powernv: Initialize the gpstate timer as pinned) Cc: [4.8+] Reported-by: Nicholas Piggin Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Shilpasri G Bhat --- Changes from V2: - Remove the check for active policy while requeing the migrated timer Changes from V1: -

Re: [PATCH] powernv: powercap: Add hard minimum powercap

2019-02-27 Thread Shilpasri G Bhat
Hi, On 02/28/2019 10:14 AM, Daniel Axtens wrote: > Shilpasri G Bhat writes: > >> In POWER9, OCC(On-Chip-Controller) provides for hard and soft system >> powercapping range. The hard powercap range is guaranteed while soft >> powercap may or may not be asserted due

[PATCH v2] powernv: powercap: Add hard minimum powercap

2019-02-28 Thread Shilpasri G Bhat
export the hard minimum powercap limit to allow the user to set the appropriate powercap value that can be managed by the system. Signed-off-by: Shilpasri G Bhat --- Changes from V1: - s/asserted/enforced by OCC .../ABI/testing/sysfs-firmware-opal-powercap | 10 arch/powerpc/platforms

[PATCH] powernv: powercap: Add hard minimum powercap

2019-02-27 Thread Shilpasri G Bhat
hard minimum powercap limit to allow the user to set the appropriate powercap value that can be managed by the system. Signed-off-by: Shilpasri G Bhat --- .../ABI/testing/sysfs-firmware-opal-powercap | 10 arch/powerpc/platforms/powernv/opal-powercap.c | 66

[PATCH v3] cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec

2014-09-11 Thread Shilpasri G Bhat
cause the target kernel to perform poorly. It will also increase the boot up time of the target kernel. So set the cpus to high pstate, in this case to nominal frequency before rebooting to avoid such scenarios. The reboot notifier will set the cpus to nominal frequncy. Signed-off-by: Shilpasri G

[PATCH v2] cpufreq: powernv: Set the cpus to nominal frequency during reboot/kexec

2014-08-28 Thread Shilpasri G Bhat
oke .target() driver callback to set the cpus to nominal frequency in reboot notifier, instead of calling cpufreq_suspend() as suggested by Viresh Kumar. Modified the commit message. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy --- drivers/cpufreq/powernv-cpufreq.c |

Re: [PATCH] cpufreq: powernv: Register the driver with reboot notifier

2014-08-20 Thread Shilpasri G Bhat
On 08/18/2014 01:16 PM, Viresh Kumar wrote: On 14 August 2014 16:49, Shilpasri G Bhat wrote: This patch ensures the cpus to kexec/reboot at nominal frequency. Nominal frequency is the highest cpu frequency on PowerPC at which the cores can run without getting throttled. If the host kernel

[PATCH] cpufreq: powernv: Register the driver with reboot notifier

2014-08-14 Thread Shilpasri G Bhat
set during a reboot/kexec similar to the suspend operartion. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy --- drivers/cpufreq/powernv-cpufreq.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv

[RFC 0/2] CPU frequency scaled from a task's load on an idle wakeup

2014-11-09 Thread Shilpasri G Bhat
rm trend of 'load-avg_contrib' metric. So cumulative average of the task can depict the nature of the task more effectively. Thus we can scale CPU frequency based on the cumulative average of the task and make calculative decisions whether to decrease or increase the frequency depending on the

[RFC 2/2] cpufreq: governor: CPU frequency scaled from task's cumulative-load on an idle wakeup

2014-11-09 Thread Shilpasri G Bhat
d. This logic intends to increase the CPU frequency if the task's cumulative load is above a threshold limit. Signed-off-by: Shilpasri G Bhat Suggested-by: Preeti U Murthy --- drivers/cpufreq/cpufreq_governor.c | 39 +++--- drivers/cpufreq/cpufreq_governor.h | 9 ++-

[RFC 1/2] sched/fair: Add cumulative average of load_avg_contrib to a task

2014-11-09 Thread Shilpasri G Bhat
= 363 At T5 the cumulative_average is 363 which is better than the load_avg_contrib value 67 when used to decide the nature of the task. Thus we can use cumulative_average to scale the cpu frequency during an idle wakeup. Signed-off-by: Shilpasri G Bhat Suggested-by: Preeti U Murthy --- in

Re: [RFC 0/2] CPU frequency scaled from a task's load on an idle wakeup

2014-11-10 Thread Shilpasri G Bhat
alue > Cumulative_average(n) is the previous cumulative average > n+1 is the number of 'load_avg_contrib' values so far > > The cumulative average of 'load_avg_contrib' will help us smooth out > the short-term fluctuations and highlight long-term trend of > 

[RESEND PATCH] cpupower: Do not change the frequency of offline cpu

2015-07-22 Thread Shilpasri G Bhat
Check if the cpu is online before changing the frequency/governor of the cpu. Reported-by: Pavaman Subramaniyam Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy Acked-by: Thomas Renninger --- Included Reported-by tag tools/power/cpupower/utils/cpufreq-set.c | 4 1 file

[PATCH] cpufreq: powernv: Increase the verbosity of OCC console messages

2015-08-27 Thread Shilpasri G Bhat
Modify the OCC reset/load/active event message to make it clearer for the user to understand the event and effect of the event. Suggested-by: Stewart Smith Signed-off-by: Shilpasri G Bhat --- This patch is based on top of linux-next/master drivers/cpufreq/powernv-cpufreq.c | 9 + 1

[PATCH] cpufreq: powernv: Export frequency throttle state of the chip through sysfs

2015-08-27 Thread Shilpasri G Bhat
-sensitive applications can monitor the throttle state using this attribute. Following file is created in sysfs: /sys/devices/system/node/nodeN/throttle 'throttle' attribute has the following values: 0 : frequency is unthrottled 1 : frequency is throttled Suggested-by: Stewart Smith Signed-off-

Re: [PATCH] cpufreq: powernv: Export frequency throttle state of the chip through sysfs

2015-08-27 Thread Shilpasri G Bhat
On 08/27/2015 03:01 PM, Michael Ellerman wrote: > On Thu, 2015-08-27 at 14:43 +0530, Shilpasri G Bhat wrote: >> Create a sysfs 'throttle' attribute per-chip(per-numa-node) to reflect >> the throttle state of the chip. The usersapce programs can poll on >> this

Re: [PATCH v5 2/6] powerpc/powernv: Add definition of OPAL_MSG_OCC message type

2015-08-10 Thread Shilpasri G Bhat
Hi Stewart, On 08/10/2015 05:53 AM, Stewart Smith wrote: > Shilpasri G Bhat writes: >> Add OPAL_MSG_OCC message definition to opal_message_type to receive >> OCC events like reset, load and throttled. Host performance can be >> affected when OCC is reset or OCC throttles

Re: [PATCH v5 3/6] cpufreq: powernv: Register for OCC related opal_message notification

2015-08-10 Thread Shilpasri G Bhat
On 08/10/2015 07:11 AM, Stewart Smith wrote: > Shilpasri G Bhat writes: >> diff --git a/drivers/cpufreq/powernv-cpufreq.c >> b/drivers/cpufreq/powernv-cpufreq.c >> index d0c18c9..a634199 100644 >> --- a/drivers/cpufreq/powernv-cpufreq.c >> +++ b/drivers/cpuf

[PATCH v5 1/6] cpufreq: powernv: Handle throttling due to Pmax capping at chip level

2015-07-16 Thread Shilpasri G Bhat
7; on Pmax capping instead set the per-chip throttled variable. Report unthrottling if Pmax is restored after throttling. This patch adds a structure to store chip id and throttled state of the chip. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy Acked-by: Viresh Kumar --- No chan

[PATCH v5 0/6] powernv: cpufreq: Report frequency throttle by OCC

2015-07-16 Thread Shilpasri G Bhat
build error due to which this series was initially dropped ERROR: ".opal_message_notifier_register" drivers/cpufreq/powernv-cpufreq.ko] undefined! Changes from v2: - Split into multiple patches - Semantic fixes Shilpasri G Bhat (6): cpufreq: powernv: Handle throttling due to Pmax

[PATCH v5 2/6] powerpc/powernv: Add definition of OPAL_MSG_OCC message type

2015-07-16 Thread Shilpasri G Bhat
respectively. The throttle OCC event indicates that the Pmax of the chip is reduced. The chip_id and throttle reason for reducing Pmax is also queued along with the message. CC: Stewart Smith Signed-off-by: Shilpasri G Bhat Acked-by: Viresh Kumar --- No change from v4 Changes from v3

[PATCH v5 3/6] cpufreq: powernv: Register for OCC related opal_message notification

2015-07-16 Thread Shilpasri G Bhat
to power or thermal reasons. We are also notified of unthrottling after an OCC reset or if OCC restores Pmax on the chip. Signed-off-by: Shilpasri G Bhat Acked-by: Viresh Kumar --- Changes from v4: - Replace memcpy() with be64_to_cpu() to copy the msg->params[] Changes from v3: - Move the ma

[PATCH v5 4/6] cpufreq: powernv: Call throttle_check() on receiving OCC_THROTTLE

2015-07-16 Thread Shilpasri G Bhat
ned-off-by: Shilpasri G Bhat Acked-by: Viresh Kumar --- No changes from v4 Changes from v3: - Refer to the members of 'struct opal_occ_msg' in the patch. Replace 'chip_id' with 'omsg.chip' drivers/cpufreq/powernv-cpufreq.c | 28 ++-- 1 fil

[PATCH v5 6/6] cpufreq: powernv: Restore cpu frequency to policy->cur on unthrottling

2015-07-16 Thread Shilpasri G Bhat
-by: Shilpasri G Bhat Acked-by: Viresh Kumar --- No changes from v4 Changes from v3: - Refer to the members of 'struct opal_occ_msg' in the patch. Replace 'reason' with 'omsg.throttle_status' drivers/cpufreq/powernv-cpufreq.c | 31 +

[PATCH v5 5/6] cpufreq: powernv: Report Psafe only if PMSR.psafe_mode_active bit is set

2015-07-16 Thread Shilpasri G Bhat
this bit for reporting throttling. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy Acked-by: Viresh Kumar --- No changes from v4 drivers/cpufreq/powernv-cpufreq.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b

[RFC PATCH] cpufreq: powernv: Add fast_switch callback

2016-05-18 Thread Shilpasri G Bhat
G Bhat --- drivers/cpufreq/powernv-cpufreq.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 54c4536..4553eb6 100644 --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv

[RFC PATCH] Increase in idle power with schedutil

2016-05-18 Thread Shilpasri G Bhat
reporting the other short-comings of cpufreq_trigger_update(). Shilpasri G Bhat (1): cpufreq: powernv: Add fast_switch callback drivers/cpufreq/powernv-cpufreq.c | 21 + 1 file changed, 21 insertions(+) -- 1.9.3

Re: [RFC PATCH] Increase in idle power with schedutil

2016-05-20 Thread Shilpasri G Bhat
Hi, On 05/19/2016 05:10 PM, Peter Zijlstra wrote: > On Wed, May 18, 2016 at 11:11:51PM +0200, Rafael J. Wysocki wrote: >> On Wed, May 18, 2016 at 2:53 PM, Shilpasri G Bhat >> wrote: >>> This patch adds driver callback for fast_switch and below observations >>> on

[PATCH] cpufreq: powernv: Redesign the presentation of throttle notification

2015-12-13 Thread Shilpasri G Bhat
) range of frequencies. # cat /sys/devices/system/node/node0/throttle_stat Turbo 7 Nominal 0 Signed-off-by: Shilpasri G Bhat --- drivers/cpufreq/powernv-cpufreq.c | 186 +- include/trace/events/power.h | 22 + 2 files changed, 166 inserti

[PATCH] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency

2015-09-13 Thread Shilpasri G Bhat
ments. So report the pmax throttling with severity when Pmax is dipped below nominal frequency. Signed-off-by: Shilpasri G Bhat --- drivers/cpufreq/powernv-cpufreq.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufr

[PATCH v2] cpufreq : powernv: Report Pmax throttling if capped below nominal frequency

2015-09-14 Thread Shilpasri G Bhat
ments. So report the pmax throttling with severity when Pmax is dipped below nominal frequency. Signed-off-by: Shilpasri G Bhat --- Changes from v1: - Modified the printk messages as per Viresh's suggestion. drivers/cpufreq/powernv-cpufreq.c | 10 -- 1 file changed, 8 insertions

[PATCH] cpupower: Do not change the frequency of offline cpu

2015-07-22 Thread Shilpasri G Bhat
Check if the cpu is online before changing the frequency/governor of the cpu. Signed-off-by: Shilpasri G Bhat --- tools/power/cpupower/utils/cpufreq-set.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/power/cpupower/utils/cpufreq-set.c b/tools/power/cpupower/utils/cpufreq-set.c

[PATCH v5 0/5] cpufreq: powernv: Redesign the presentation of throttle notification and solve bug-fixes in the driver

2016-01-21 Thread Shilpasri G Bhat
tches separating the tracepoint and sysfs attribute changes. Changes from v2: - Fixed kbuild test warning. drivers/cpufreq/powernv-cpufreq.c:609:2: warning: ignoring return value of 'kstrtoint', declared with attribute warn_unused_result [-Wunused-result] Shilpasri G Bhat (5): cpufr

[PATCH v5 4/5] cpufreq: powernv: Replace pr_info with trace print for throttle event

2016-01-21 Thread Shilpasri G Bhat
/pr_warn_once as pointed by MFG to not mark them as critical messages. This patch adds 'throt_reason' to struct chip to store the throttle reason. Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy --- Changes from v4: - Taken care of Gautham's comments to remove t

[PATCH v5 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-21 Thread Shilpasri G Bhat
he hotpath. Reported-by: Anton Blanchard Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy --- Changes from v4: - Taken care of Shreyas's comments to add a core_to_chip_map array to store the chip id. drivers/cpufreq/powernv-cpufreq.c | 24 +--- 1 file changed

[PATCH v5 3/5] cpufreq: powernv/tracing: Add powernv_throttle tracepoint

2016-01-21 Thread Shilpasri G Bhat
This patch adds the powernv_throttle tracepoint to trace the CPU frequency throttling event, which is used by the powernv-cpufreq driver in POWER8. Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy CC: Ingo Molnar CC: Steven Rostedt --- No changes since v2. include/trace/events

[PATCH v5 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-21 Thread Shilpasri G Bhat
gives the total number of events of max frequency throttling to lower frequencies in the turbo range of frequencies and the sub-turbo(at and below nominal) range of frequencies. # cat /sys/devices/system/cpu/cpufreq/chip0/throttle_stat turbo 7 sub-turbo 0 Signed-off-by: Shilpa

[PATCH v5 1/5] cpufreq: powernv: Hot-plug safe the kworker thread

2016-01-21 Thread Shilpasri G Bhat
Suggested-by: Gautham R Shenoy Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy --- drivers/cpufreq/powernv-cpufreq.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index

[PATCH v6 0/5] cpufreq: powernv: Redesign the presentation of throttle notification and solve bug-fixes in the driver

2016-01-21 Thread Shilpasri G Bhat
/cpufreq/powernv-cpufreq.c:609:2: warning: ignoring return value of 'kstrtoint', declared with attribute warn_unused_result [-Wunused-result] Shilpasri G Bhat (5): cpufreq: powernv: Hot-plug safe the kworker thread cpufreq: powernv: Remove cpu_to_chip_id() from hot-path cpufre

[PATCH v6 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-21 Thread Shilpasri G Bhat
gives the total number of events of max frequency throttling to lower frequencies in the turbo range of frequencies and the sub-turbo(at and below nominal) range of frequencies. # cat /sys/devices/system/cpu/cpufreq/chip0/throttle_stat turbo 7 sub-turbo 0 Signed-off-by: Shilpasri G Bhat

[PATCH v6 1/5] cpufreq: powernv: Hot-plug safe the kworker thread

2016-01-21 Thread Shilpasri G Bhat
Suggested-by: Gautham R Shenoy Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy --- Changes form v5: - Fix the kbuild-error: drivers/cpufreq/powernv-cpufreq.c:428:2: error: implicit declaration of function 'get_online_cpus' [-Werror=implicit-function-declaration drive

[PATCH v6 4/5] cpufreq: powernv: Replace pr_info with trace print for throttle event

2016-01-21 Thread Shilpasri G Bhat
/pr_warn_once as pointed by MFG to not mark them as critical messages. This patch adds 'throt_reason' to struct chip to store the throttle reason. Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy --- No changes from v5. Changes from v4: - Taken care of Gautham's comments to

[PATCH v6 3/5] cpufreq: powernv/tracing: Add powernv_throttle tracepoint

2016-01-21 Thread Shilpasri G Bhat
This patch adds the powernv_throttle tracepoint to trace the CPU frequency throttling event, which is used by the powernv-cpufreq driver in POWER8. Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy CC: Ingo Molnar CC: Steven Rostedt --- No changes since v2. include/trace/events

[PATCH v6 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-21 Thread Shilpasri G Bhat
he hotpath. Reported-by: Anton Blanchard Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy --- No changes from v5. Changes from v4: - Taken care of Shreyas's comments to add a core_to_chip_map array to store the chip id. drivers/cpufreq/powernv-cpufreq.c | 24 +

[PATCH v2 2/2] cpufreq: powernv: Redesign the presentation of throttle notification

2016-01-01 Thread Shilpasri G Bhat
s/devices/system/cpu/cpufreq/chip0/throttle_stat turbo 7 sub-turbo 0 Signed-off-by: Shilpasri G Bhat --- Changes from v1: - Added a kobject to struct chip - Grouped the throttle reasons under a separate attribute_group and exported each reason as individual file. - Moved the sysfs files from /sys

[PATCH v2 1/2] cpufreq: powernv/tracing: Add powernv_throttle tracepoint

2016-01-01 Thread Shilpasri G Bhat
This patch adds the powernv_throttle tracepoint to trace the CPU frequency throttling event, which is used by the powernv-cpufreq driver in POWER8. Signed-off-by: Shilpasri G Bhat CC: Ingo Molnar CC: Steven Rostedt --- Changes from v1: - Export the tracepoint include/trace/events/power.h

[PATCH v2 0/2] cpufreq: powernv: Redesign the presentation of throttle notification

2016-01-01 Thread Shilpasri G Bhat
ys/devices/system/cpu/cpufreq/chipN. Shilpasri G Bhat (2): cpufreq: powernv/tracing: Add powernv_throttle tracepoint cpufreq: powernv: Redesign the presentation of throttle notification drivers/cpufreq/powernv-cpufreq.c | 247 +++--- include/trace/even

Re: [PATCH] cpufreq: powernv: Redesign the presentation of throttle notification

2016-01-01 Thread Shilpasri G Bhat
Hi, On 12/15/2015 02:59 AM, Paul Clarke wrote: > On 12/13/2015 12:17 PM, Shilpasri G Bhat wrote: >> Replace the throttling event console messages to perf trace event >> "power:powernv_throttle" and throttle counter stats which are >> exported in sysfs. The newly a

[PATCH v3 0/2] cpufreq: powernv: Redesign the presentation of throttle notification

2016-01-04 Thread Shilpasri G Bhat
ys/devices/system/cpu/cpufreq/chipN. Changes from v2: - Fixed kbuild test warning. drivers/cpufreq/powernv-cpufreq.c:609:2: warning: ignoring return value of 'kstrtoint', declared with attribute warn_unused_result [-Wunused-result] Shilpasri G Bhat (2): cpufreq: powernv/tracing:

[PATCH v3 2/2] cpufreq: powernv: Redesign the presentation of throttle notification

2016-01-04 Thread Shilpasri G Bhat
s/devices/system/cpu/cpufreq/chip0/throttle_stat turbo 7 sub-turbo 0 Signed-off-by: Shilpasri G Bhat --- Changes from v2: - Fixed kbuild test warning. drivers/cpufreq/powernv-cpufreq.c:609:2: warning: ignoring return value of 'kstrtoint', declared with attribute warn_unused_result [-Wu

[PATCH v3 1/2] cpufreq: powernv/tracing: Add powernv_throttle tracepoint

2016-01-04 Thread Shilpasri G Bhat
This patch adds the powernv_throttle tracepoint to trace the CPU frequency throttling event, which is used by the powernv-cpufreq driver in POWER8. Signed-off-by: Shilpasri G Bhat CC: Ingo Molnar CC: Steven Rostedt --- No changes from v2. Changes from v1: - Export the tracepoint include

Re: [PATCH V3 00/13] cpufreq: governors: Fix ABBA lockups

2016-02-08 Thread Shilpasri G Bhat
Hi, On 02/08/2016 05:09 PM, Viresh Kumar wrote: > Hi Rafael, > > Things look much much better now. I have rebased this series over > pm/bleeding-edge, that has all your patches. > > I have moved ahead and done few more changes in this series, that should > get rid of all the lockdeps we were get

[PATCH v9] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-08 Thread Shilpasri G Bhat
/throttle_stats/overcurrent 8)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset Detailed explanation of each attribute is added to Documentation/ABI/testing/sysfs-devices-system-cpu Signed-off-by: Shilpasri G Bhat --- Changes from v8: - Moved the sysfs attributes from cpu/cpufreq/chipX

[PATCH v10 2/2] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-26 Thread Shilpasri G Bhat
/throttle_stats/overcurrent 8)/sys/devices/system/cpu/cpuX/cpufreq/throttle_stats/occ_reset Detailed explanation of each attribute is added to Documentation/ABI/testing/sysfs-devices-system-cpu CC: linux-...@vger.kernel.org Signed-off-by: Shilpasri G Bhat --- Changes from v9: - Modified

[PATCH v10 0/2] cpufreq: powernv: Export throttle stat attributes and a bug fix

2016-02-26 Thread Shilpasri G Bhat
powernv_cpufreq_exit() as suggested by Viresh. - Patch[2/2] is rebased on top of Patch[1/2]. Shilpasri G Bhat (2): cpufreq: powernv: Fix bugs in powernv_cpufreq_{init/exit} cpufreq: powernv: Add sysfs attributes to show throttle stats Documentation/ABI/testing/sysfs-devices-system-cpu | 69

[PATCH v10 1/2] cpufreq: powernv: Fix bugs in powernv_cpufreq_{init/exit}

2016-02-26 Thread Shilpasri G Bhat
Unregister the notifiers if cpufreq_driver_register() fails in powernv_cpufreq_init(). Re-arrange the unregistration and cleanup routines in powernv_cpufreq_exit() to free all the resources after the driver has unregistered. Signed-off-by: Shilpasri G Bhat --- drivers/cpufreq/powernv-cpufreq.c

Re: [RFC 1/2] sched/fair: Add cumulative average of load_avg_contrib to a task

2014-11-11 Thread Shilpasri G Bhat
On 11/10/2014 07:19 PM, Peter Zijlstra wrote: > On Mon, Nov 10, 2014 at 11:15:57AM +0530, Shilpasri G Bhat wrote: >> +/** >> + * task_cumulative_load - return the cumulative load of >> + * the previous task if cpu is the current cpu OR the >> + * cumulative load of curr

Re: [PATCH v3 1/6] cpufreq: poowernv: Handle throttling due to Pmax capping at chip level

2015-05-07 Thread Shilpasri G Bhat
On 05/05/2015 02:08 PM, Preeti U Murthy wrote: > On 05/05/2015 11:36 AM, Shilpasri G Bhat wrote: >> Hi Preeti, >> >> On 05/05/2015 09:21 AM, Preeti U Murthy wrote: >>> Hi Shilpa, >>> >>> On 05/04/2015 02:24 PM, Shilpasri G Bhat wrote: >>>

Re: [PATCH v3 1/6] cpufreq: poowernv: Handle throttling due to Pmax capping at chip level

2015-05-04 Thread Shilpasri G Bhat
Hi Preeti, On 05/05/2015 09:21 AM, Preeti U Murthy wrote: > Hi Shilpa, > > On 05/04/2015 02:24 PM, Shilpasri G Bhat wrote: >> The On-Chip-Controller(OCC) can throttle cpu frequency by reducing the >> max allowed frequency for that chip if the chip exceeds its power or >

Re: [PATCH v3 4/6] cpufreq: powernv: Call throttle_check() on receiving OCC_THROTTLE

2015-05-04 Thread Shilpasri G Bhat
Hi Preeti, On 05/05/2015 09:30 AM, Preeti U Murthy wrote: > Hi Shilpa, > > On 05/04/2015 02:24 PM, Shilpasri G Bhat wrote: >> Re-evaluate the chip's throttled state on recieving OCC_THROTTLE >> notification by executing *throttle_check() on any one of the cpu on >

[PATCH v3 0/6] powernv: cpufreq: Report frequency throttle by OCC

2015-05-04 Thread Shilpasri G Bhat
limit the max allowed frequency. The patchset will report such conditions so as to keep the user informed about reason for the drop in performance of workloads when frequency is throttled. Changes from v2: - Split into multiple patches - Semantic fixes Shilpasri G Bhat (6): cpufreq: poowernv

[PATCH v3 3/6] cpufreq: powernv: Register for OCC related opal_message notification

2015-05-04 Thread Shilpasri G Bhat
to power or thermal reasons. We are also notified of unthrottling after an OCC reset or if OCC restores Pmax on the chip. Signed-off-by: Shilpasri G Bhat --- Changes from v2: - Patch split in to multiple patches. - This patch contains only the opal_message notification handler Changes from v1

[PATCH v3 4/6] cpufreq: powernv: Call throttle_check() on receiving OCC_THROTTLE

2015-05-04 Thread Shilpasri G Bhat
ned-off-by: Shilpasri G Bhat --- drivers/cpufreq/powernv-cpufreq.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 9268424..9618813 100644 --- a/drivers/cpufreq/powernv

[PATCH v3 2/6] powerpc/powernv: Add definition of OPAL_MSG_OCC message type

2015-05-04 Thread Shilpasri G Bhat
opal_message_type. Signed-off-by: Shilpasri G Bhat Reviewed-by: Preeti U Murthy --- No change from V2 Change from v1: - Update the commit changelog arch/powerpc/include/asm/opal-api.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include

  1   2   3   >