[RFC v3] cpuidle : Add support for pseudo-cpuidle driver

2020-11-08 Thread Abhishek Goel
of cpuidle states in the driver by the user. Will add the capability of this driver to be used as a module in subsequent patches. Original idea and discussion for this patch can be found at: https://lkml.org/lkml/2019/12/17/655 Signed-off-by: Abhishek Goel --- v1->v2 : Changes adapted f

[RFC v2] cpuidle : Add support for pseudo-cpuidle driver

2020-09-21 Thread Abhishek Goel
set of cpuidle states in the driver. Will add the capability of this driver to be used as a module in subsequent patches. Original idea and discussion for this patch can be found at: https://lkml.org/lkml/2019/12/17/655 Signed-off-by: Abhishek Goel --- v1-> v2 : Includes minor changes adap

[RFC] cpuidle : Add support for pseudo-cpuidle driver

2020-07-23 Thread Abhishek Goel
set of cpuidle states in the driver. Will add the capability of this driver to be used as a module in subsequent patches. Original idea and discussion for this patch can be found at: https://lkml.org/lkml/2019/12/17/655 Signed-off-by: Abhishek Goel --- drivers/cpuidle/Kconfig| 9

[PATCH] cpuidle/powernv : Remove dead code block

2020-07-05 Thread Abhishek Goel
Commit 1961acad2f88559c2cdd2ef67c58c3627f1f6e54 removes usage of function "validate_dt_prop_sizes". This patch removes this unused function. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drive

[RFC v2 2/2] powerpc/powernv : Introduce capability for firmware-enabled-stop

2020-07-05 Thread Abhishek Goel
if firmware-stop-supported property is present. Earlier part of this patch was posted in this series : https://lkml.org/lkml/2020/3/4/589 Signed-off-by: Abhishek Goel Signed-off-by: Pratik Rajesh Sampat --- v1->v2 : Combined patch 2 and 3 from previous iteration and rebased it. arch/powe

[RFC v2 1/2] powerpc/powernv : Add support for pre-entry and post-exit of stop state using OPAL V4 OS services

2020-07-05 Thread Abhishek Goel
, are then handled in opal, from where we return successfully back to kernel. Signed-off-by: Abhishek Goel --- v1->v2 : Rebased the patch on Nick's Opal V4 OS patchset arch/powerpc/include/asm/opal-api.h| 4 +++- arch/powerpc/include/asm/opal.h| 1 + arch/powerpc/platfo

[PATCH v3] cpupower : Handle set and info subcommands correctly

2019-10-16 Thread Abhishek Goel
Subcommand not supported on POWER Same result for set subcommand. This patch does not affect results on a intel box. Signed-off-by: Abhishek Goel Acked-by: Thomas Renninger --- v1 -> v2 : Instead of bailing out early in set and info commands, in V2, we are cutting out supp

[PATCH v5 0/3] Forced-wakeup for stop states on Powernv

2019-10-03 Thread Abhishek Goel
that was found out in recent experiments. No change in patch 2 and 3. Abhishek Goel (3): cpuidle-powernv : forced wakeup for stop states cpuidle : Add callback whenever a state usage is enabled/disabled cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled

[RFC v5 2/3] cpuidle : Add callback whenever a state usage is enabled/disabled

2019-10-03 Thread Abhishek Goel
-by: Abhishek Goel --- drivers/cpuidle/sysfs.c | 15 ++- include/linux/cpuidle.h | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 2bb2683b4..6c9bf2f7b 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle

[RFC v5 3/3] cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled/disabled

2019-10-03 Thread Abhishek Goel
idle path. We also use the computed timeout to get timeout for snooze, thus getting rid of get_snooze_timeout for snooze loop. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 35 +++ include/linux/cpuidle.h | 1 + 2 files changed, 13

[PATCH v5 1/3] cpuidle-powernv : forced wakeup for stop states

2019-10-03 Thread Abhishek Goel
will essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic

[PATCH v2] cpupower : Handle set and info subcommands correctly

2019-09-13 Thread Abhishek Goel
Supported commands are: frequency-info frequency-set idle-info idle-set monitor help Same result for set subcommand. This patch does not affect results on a intel box. Signed-off-by: Abhishek Goel Acked-by: Thomas Renninger --- changes from v1

[PATCH] cpupower : Handle set and info subcommands for powerpc

2019-09-11 Thread Abhishek Goel
Cpupower tool has set and info options which are not being used by POWER machines. For powerpc, we will return directly for these two subcommands. This removes the ambiguous error message while using set option in case of power systems. Signed-off-by: Abhishek Goel --- tools/power/cpupower

[RFC 1/3] cpuidle/powernv : Pass state pointer instead of values to stop loop

2019-08-23 Thread Abhishek Goel
info. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/processor.h | 5 +- arch/powerpc/platforms/powernv/idle.c | 50 --- drivers/cpuidle/cpuidle-powernv.c | 69 +-- 3 files changed, 55 insertions(+), 69 deletions(-) diff --git a/arch/powerpc

[RFC 3/3] cpuidle/powernv : Add flags to identify stop state type

2019-08-23 Thread Abhishek Goel
Removed threshold latency which was being used to decide if a state is cpuidle type or not. This decision can be taken using flags, as this information has been encapsulated in the state->flags and being read from idle device-tree. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/o

[RFC 0/3] New idle device-tree format and support for versioned stop state

2019-08-23 Thread Abhishek Goel
residency-ns = <0x989680>; psscr = <0x0 0x300374>; ... }; ... stop11 { ... compatible = "stop11,v1", ... };

[RFC 2/3] cpuidle/powernv: Add support for versioned stop states

2019-08-23 Thread Abhishek Goel
y of the code. Stop handle corresponding to each state can be called directly since state pointer is being passed now. Signed-off-by: Abhishek Goel --- arch/powerpc/include/asm/cpuidle.h| 8 +- arch/powerpc/platforms/powernv/idle.c | 331 +++--- 2 files changed, 299 i

[RFC v4 3/3] cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled/disabled

2019-07-12 Thread Abhishek Goel
idle path. We also use the computed timeout to get timeout for snooze, thus getting rid of get_snooze_timeout for snooze loop. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 35 +++ include/linux/cpuidle.h | 1 + 2 files changed, 13

[PATCH v4 0/3] Forced-wakeup for stop states on Powernv

2019-07-12 Thread Abhishek Goel
/reset decrementer function. Handled irq work pending in try_set_dec_before_idle. No change in patch 2 and 3. Abhishek Goel (3): cpuidle-powernv : forced wakeup for stop states cpuidle : Add callback whenever a state usage is enabled/disabled cpuidle-powernv : Recompute the idle

[RFC v4 2/3] cpuidle : Add callback whenever a state usage is enabled/disabled

2019-07-12 Thread Abhishek Goel
-by: Abhishek Goel --- drivers/cpuidle/sysfs.c | 15 ++- include/linux/cpuidle.h | 4 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index eb20adb5de23..141671a53967 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers

[PATCH v4 1/3] cpuidle-powernv : forced wakeup for stop states

2019-07-12 Thread Abhishek Goel
will essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic

[RFC v3 2/3] cpuidle : Add callback whenever a state usage is enabled/disabled

2019-07-04 Thread Abhishek Goel
-by: Abhishek Goel --- drivers/cpuidle/sysfs.c | 15 ++- include/linux/cpuidle.h | 4 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index eb20adb5d..141671a53 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers

[PATCH v3 0/3] Forced-wakeup for stop states on Powernv

2019-07-04 Thread Abhishek Goel
a state is enbaled or disabled instead of computing everytime in fast idle path. 3) Use disable callback to recompute timeout whenever state usage is changed for a state. Also, cleaned up the get_snooze_timeout function. Abhishek Goel (3): cpuidle-powernv

[PATCH v3 1/3] cpuidle-powernv : forced wakeup for stop states

2019-07-04 Thread Abhishek Goel
will essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic

[RFC v3 3/3] cpuidle-powernv : Recompute the idle-state timeouts when state usage is enabled/disabled

2019-07-04 Thread Abhishek Goel
idle path. We also use the computed timeout to get timeout for snooze, thus getting rid of get_snooze_timeout for snooze loop. Signed-off-by: Abhishek Goel --- drivers/cpuidle/cpuidle-powernv.c | 35 +++ include/linux/cpuidle.h | 1 + 2 files changed, 13

[PATCH v2 1/1] cpuidle-powernv : forced wakeup for stop states

2019-06-17 Thread Abhishek Goel
will essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Thus, cpu will eventually end up in the deepest possible state. Signed-off-by: Abhishek Goel --- Auto-promotion v1 : started as auto promotion logic

[PATCH v2 0/1] Forced-wakeup for stop states on Powernv

2019-06-17 Thread Abhishek Goel
instead of auto-promotion v2 of forced-wakeup : Extended the forced wakeup logic for all states. Setting the decrementer instead of queuing up a hrtimer to implement the logic. Abhishek Goel (1): cpuidle-powernv : forced wakeup for stop states drivers/cpuidle/cpuidle-powernv.c | 38

[PATCH] cpupower : frequency-set -r option misses the last cpu in related cpu list

2019-05-29 Thread Abhishek Goel
to be missing the last cpu in related cpu list. This patch fixes the problem. Signed-off-by: Abhishek Goel --- tools/power/cpupower/utils/cpufreq-set.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/power/cpupower/utils/cpufreq-set.c b/tools/power/cpupower/utils/cpufreq-set.c index 1eef0aed6

[PATCH 1/1] cpuidle-powernv : forced wakeup for stop lite states

2019-04-22 Thread Abhishek Goel
. Few such iterations will essentially train the governor to select a deeper state for that cpu, as the timer here corresponds to the next available cpuidle state residency. Cpu will be kicked out of the lite state and end up in a non-lite state. Signed-off-by: Abhishek Goel --- arch/powerpc/include

[PATCH 0/1] Forced-wakeup for stop lite states on Powernv

2019-04-22 Thread Abhishek Goel
consumption. We may extend this model for other states in future. Abhishek Goel (1): cpuidle-powernv : forced wakeup for stop lite states arch/powerpc/include/asm/opal-api.h | 1 + drivers/cpuidle/cpuidle-powernv.c | 71 - 2 files changed, 71 insertions(+), 1 deletion

[PATCH] tools/power/cpupower: Display boost frequency separately

2019-02-05 Thread Abhishek Goel
platforms will rely on "scaling_boost_frequency" file to display boost frequency. Signed-off-by: Abhishek Goel --- tools/power/cpupower/lib/cpufreq.c| 19 +- tools/power/cpupower/lib/cpufreq.h| 16 - tools/power/cpupower/utils/cpufreq-info.c | 42

[PATCH] cpupower : Auto-completion for cpupower tool

2018-12-05 Thread Abhishek Goel
:~# cpupower frequency-set -f 206 root@ubuntu:~# cpupower frequency-set -f 2061000 Signed-off-by: Abhishek Goel Signed-off-by: Bharath Thodla Tested-by: Thomas Renninger --- tools/power/cpupower/Makefile | 6 +- tools/power/cpupower/cpupower-completion.sh | 128

[PATCH] cpupower : Auto-completion for cpupower tool

2018-12-05 Thread Abhishek Goel
:~# cpupower frequency-set -f 206 root@ubuntu:~# cpupower frequency-set -f 2061000 Signed-off-by: Abhishek Goel Signed-off-by: Bharath Thodla Tested-by: Thomas Renninger --- tools/power/cpupower/Makefile | 6 +- tools/power/cpupower/cpupower-completion.sh | 128

[PATCH] cpuidle/powernv : Add Description for cpuidle state

2018-05-28 Thread Abhishek Goel
or -l" or "cpupower idle-info". Signed-off-by: Abhishek Goel --- The skiboot patch which adds description for idle states in device tree can be found here: https://patchwork.ozlabs.org/patch/921637/ drivers/cpuidle/cpuidle-powernv.c | 17 + include/linux/cpuidle.h

[PATCH] cpuidle/powernv : Add Description for cpuidle state

2018-05-28 Thread Abhishek Goel
or -l" or "cpupower idle-info". Signed-off-by: Abhishek Goel --- The skiboot patch which adds description for idle states in device tree can be found here: https://patchwork.ozlabs.org/patch/921637/ drivers/cpuidle/cpuidle-powernv.c | 17 + include/linux/cpuidle.h

[PATCH] cpupower : Fix header name to read idle state name

2018-05-28 Thread Abhishek Goel
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: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- Previous attempt was

[PATCH] cpupower : Fix header name to read idle state name

2018-05-28 Thread Abhishek Goel
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: Abhishek Goel --- Previous attempt was made by Seeteena Thoufeek. This is the pa

[PATCH v3] cpufreq: powernv: Add support of frequency domain

2018-01-22 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- Skiboot patch required for the corresponding device-tree changes have been posted here : http://patchwork.ozlabs.org/patch/862256/ drivers/cpufreq/powernv-cpufreq.c | 104 ++ 1 file change

[PATCH v3] cpufreq: powernv: Add support of frequency domain

2018-01-22 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel --- Skiboot patch required for the corresponding device-tree changes have been posted here : http://patchwork.ozlabs.org/patch/862256/ drivers/cpufreq/powernv-cpufreq.c | 104 ++ 1 file changed, 95 insertions(+), 9 deletion

[PATCH v2] cpufreq: powernv: Add support of frequency domain

2017-12-19 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c | 110 ++ 1 file changed, 100 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index

[PATCH v2] cpufreq: powernv: Add support of frequency domain

2017-12-19 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel --- drivers/cpufreq/powernv-cpufreq.c | 110 ++ 1 file changed, 100 insertions(+), 10 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index b6d7c4c..fd642bc 100644 --- a/drive

[PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-13 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- drivers/cpufreq/powernv-cpufreq.c | 95 +++ 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index b6d7c4c

[PATCH] cpufreq: powernv: Add support of frequency domain

2017-12-13 Thread Abhishek Goel
y. Signed-off-by: Abhishek Goel --- drivers/cpufreq/powernv-cpufreq.c | 95 +++ 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index b6d7c4c..9384110 100644 --- a/drive

[PATCH v3] cpupower : Fix cpupower working when cpu0 is offline

2017-11-15 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online which is not a valid assumption on POWER machines. This patch fixes this by getting the cpu on which the current thread is running, instead of always using cpu0 for monitoring which may not be online. Signed-off-by: Abhishek Goel <h

[PATCH v3] cpupower : Fix cpupower working when cpu0 is offline

2017-11-15 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online which is not a valid assumption on POWER machines. This patch fixes this by getting the cpu on which the current thread is running, instead of always using cpu0 for monitoring which may not be online. Signed-off-by: Abhishek Goel

[PATCH v2] cpupowerutils: bench - Fix cpu online check

2017-11-07 Thread Abhishek Goel
cpupower_is_cpu_online was incorrectly checking for 0. This patch fixes this by checking for 1 when the cpu is online. Signed-off-by: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- v2: Commit message rephrased. --- tools/power/cpupower/bench/system.c | 2 +- 1 file changed, 1 insertion

[PATCH v2] cpupowerutils: bench - Fix cpu online check

2017-11-07 Thread Abhishek Goel
cpupower_is_cpu_online was incorrectly checking for 0. This patch fixes this by checking for 1 when the cpu is online. Signed-off-by: Abhishek Goel --- v2: Commit message rephrased. --- tools/power/cpupower/bench/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools

[PATCH v2] cpupower : Fix cpupower working when cpu0 is offline

2017-11-06 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online which is not a valid assumption on POWER machines. This patch fixes this by searching for the first online cpu and uses it, instead of always using cpu0 for monitoring which may not be online. Signed-off-by: Abhishek Goel <h

[PATCH v2] cpupower : Fix cpupower working when cpu0 is offline

2017-11-06 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online which is not a valid assumption on POWER machines. This patch fixes this by searching for the first online cpu and uses it, instead of always using cpu0 for monitoring which may not be online. Signed-off-by: Abhishek Goel --- v2: Commit

[PATCH] cpupower : Fix cpupower working when cpu0 is offline

2017-09-22 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online. Now the cpuidle_monitor function searches for the first online cpu and use it, instead of always using cpu0 which may not be online. Signed-off-by: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- tools/power/cpupower/utils/idle_m

[PATCH] cpupower : Fix cpupower working when cpu0 is offline

2017-09-22 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online. Now the cpuidle_monitor function searches for the first online cpu and use it, instead of always using cpu0 which may not be online. Signed-off-by: Abhishek Goel --- tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c | 14

[PATCH] cpupower : Fix cpupower working when cpu0 is offline

2017-09-22 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online. Now the cpuidle_monitor function searches for the first online cpu and use it, instead of always using cpu0 which maynot be online. Signed-off-by: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- tools/power/cpupower/utils/idle_m

[PATCH] cpupower : Fix cpupower working when cpu0 is offline

2017-09-22 Thread Abhishek Goel
cpuidle_monitor used to assume that cpu0 is always online. Now the cpuidle_monitor function searches for the first online cpu and use it, instead of always using cpu0 which maynot be online. Signed-off-by: Abhishek Goel --- tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c | 6 +++--- 1

[PATCH] cpupowerutils: bench - Fix cpu online check

2017-09-18 Thread Abhishek Goel
cpupower_is_cpu_online returns 1 when cpu is online. But in function set_cpufreq_governor, it was incorrectly checking for 0 in case cpu is online. Signed-off-by: Abhishek Goel <hunt...@linux.vnet.ibm.com> --- tools/power/cpupower/bench/system.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH] cpupowerutils: bench - Fix cpu online check

2017-09-18 Thread Abhishek Goel
cpupower_is_cpu_online returns 1 when cpu is online. But in function set_cpufreq_governor, it was incorrectly checking for 0 in case cpu is online. Signed-off-by: Abhishek Goel --- tools/power/cpupower/bench/system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools