[PATCH] tick/idle/powerpc: Do not register idle states with CPUIDLE_FLAG_TIMER_STOP set in periodic mode

2015-06-24 Thread Preeti U Murthy
on the hrtimer mode of broadcast in periodic mode. This patch takes care of doing this on powerpc. The cpus would not have entered into such deep cpuidle states in periodic mode on powerpc anyway. So there is no loss here. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- drivers/cpuidle

Re: [PATCH] tick/idle/powerpc: Do not register idle states with CPUIDLE_FLAG_TIMER_STOP set in periodic mode

2015-06-24 Thread Preeti U Murthy
, the machine will hang. OK, which -stable? All of them or any specific series? This needs to go into stable/linux-3.19.y, stable/linux-4.0.y, stable/linux-4.1.y. Thanks Regards Preeti U Murthy Rafael ___ Linuxppc-dev mailing list Linuxppc-dev

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

2015-06-18 Thread Preeti U Murthy
to the cpuidle governor to re-evaluate the last idle state of the cpu to promote it to deeper idle states. Signed-off-by: Shilpasri G Bhat shilpa.b...@linux.vnet.ibm.com --- Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com Changes from v1: -Modified commit message drivers/cpuidle/cpuidle

Re: [PATCH v2 7/7]powerpc/powernv: nest pmu cpumask and cpu hotplug support

2015-06-16 Thread Preeti U Murthy
suka...@linux.vnet.ibm.com Cc: Anshuman Khandual khand...@linux.vnet.ibm.com Cc: Stephane Eranian eran...@google.com Cc: Preeti U Murthy pre...@linux.vnet.ibm.com Cc: Ingo Molnar mi...@kernel.org Cc: Peter Zijlstra pet...@infradead.org Signed-off-by: Madhavan Srinivasan ma

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

2015-05-30 Thread Preeti U Murthy
On 05/30/2015 11:31 AM, Vaidyanathan Srinivasan wrote: * Preeti U Murthy pre...@linux.vnet.ibm.com [2015-05-29 19:17:17]: [snip] + if (max_idle_state 1) { + snooze_timeout_en = true; + snooze_timeout = cpuidle_state_table[1].target_residency

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

2015-05-29 Thread Preeti U Murthy
* + tb_ticks_per_usec; + } Any idea why we don't have snooze defined on the shared lpar configuration ? Regards Preeti U Murthy return 0; } ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

Re: [PATCH 0/3] cpuidle: updates related to tick_broadcast_enter() failures

2015-05-13 Thread Preeti U Murthy
timers with genpd unless we have a way to power the timer PM domain down, depending on when it is supposed to fire, in which case we will merely be replicating the cpuidle governor code. Regards Preeti U Murthy So question is whether or not this is actually really more straightforward than

Re: [PATCH 0/3] cpuidle: updates related to tick_broadcast_enter() failures

2015-05-10 Thread Preeti U Murthy
On 05/10/2015 04:45 AM, Rafael J. Wysocki wrote: On Saturday, May 09, 2015 10:33:05 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 10:11:41 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 11:19:16 AM Preeti U Murthy wrote: Hi Rafael, On 05/08/2015 07:48 PM, Rafael J. Wysocki

Re: [PATCH 0/3] cpuidle: updates related to tick_broadcast_enter() failures

2015-05-10 Thread Preeti U Murthy
On 05/10/2015 04:45 AM, Rafael J. Wysocki wrote: On Saturday, May 09, 2015 10:33:05 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 10:11:41 PM Rafael J. Wysocki wrote: On Saturday, May 09, 2015 11:19:16 AM Preeti U Murthy wrote: Hi Rafael, On 05/08/2015 07:48 PM, Rafael J. Wysocki

[PATCH V3] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-08 Thread Preeti U Murthy
driver, else the rq-idle_state will be set wrong. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from V2: https://lkml.org/lkml/2015/5/7/78 Introduce a function in cpuidle core to select an idle state where ticks do not stop rather than going through the governors. Changes from

Re: [PATCH V2] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-08 Thread Preeti U Murthy
On 05/08/2015 02:20 AM, Rafael J. Wysocki wrote: On Thursday, May 07, 2015 11:17:21 PM Preeti U Murthy wrote: When a CPU has to enter an idle state where tick stops, it makes a call to tick_broadcast_enter(). The call will fail if this CPU is the broadcast CPU. Today, under such a circumstance

Re: [PATCH V3] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-08 Thread Preeti U Murthy
, +CPUIDLE_FLAG_TIMER_STOP); + if (index 0) { + default_idle_call(); + return -EBUSY; + } + target_state = drv-states[index]; } trace_cpu_idle_rcuidle(index, dev-cpu); Regards Preeti U Murthy

Re: [RESEND PATCH] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-07 Thread Preeti U Murthy
On 05/07/2015 11:09 PM, Preeti U Murthy wrote: When a CPU has to enter an idle state where tick stops, it makes a call to tick_broadcast_enter(). The call will fail if this CPU is the broadcast CPU. Today, under such a circumstance, the arch cpuidle code handles this CPU

[PATCH V2] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-07 Thread Preeti U Murthy
from the core to the cpuidle driver, else the rq-idle_state will be set wrong. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from V1: https://lkml.org/lkml/2015/5/7/24 Rebased on the latest linux-pm/bleeding-edge drivers/cpuidle/cpuidle.c | 21

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

2015-05-07 Thread Preeti U Murthy
On 05/05/2015 02:11 PM, Preeti U Murthy wrote: On 05/05/2015 12:03 PM, Shilpasri G Bhat wrote: 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

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

2015-05-07 Thread Preeti U Murthy
On 05/08/2015 02:29 AM, Rafael J. Wysocki wrote: On Thursday, May 07, 2015 05:49:22 PM Preeti U Murthy wrote: On 05/05/2015 02:11 PM, Preeti U Murthy wrote: On 05/05/2015 12:03 PM, Shilpasri G Bhat wrote: Hi Preeti, On 05/05/2015 09:30 AM, Preeti U Murthy wrote: Hi Shilpa, On 05/04/2015

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

2015-05-07 Thread Preeti U Murthy
On 05/07/2015 04:05 PM, Shilpasri G Bhat wrote: 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: The On-Chip-Controller

[RESEND PATCH] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-07 Thread Preeti U Murthy
from the core to the cpuidle driver, else the rq-idle_state will be set wrong. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Rebased on the latest linux-pm/bleeding-edge drivers/cpuidle/cpuidle.c | 21 + drivers/cpuidle/governors/ladder.c | 13

[PATCH] cpuidle: Handle tick_broadcast_enter() failure gracefully

2015-05-06 Thread Preeti U Murthy
from the core to the cpuidle driver, else the rq-idle_state will be set wrong. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Based on linux-pm/bleeding-edge drivers/cpuidle/cpuidle.c | 21 + drivers/cpuidle/governors/ladder.c | 13

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

2015-05-05 Thread Preeti U Murthy
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: The On-Chip-Controller(OCC) can throttle cpu frequency by reducing the max allowed frequency for that chip if the chip

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

2015-05-05 Thread Preeti U Murthy
On 05/05/2015 12:03 PM, Shilpasri G Bhat wrote: 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

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

2015-05-05 Thread Preeti U Murthy
0; Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

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

2015-05-04 Thread Preeti U Murthy
); + opal_message_notifier_register(OPAL_MSG_OCC, powernv_cpufreq_opal_nb); return cpufreq_register_driver(powernv_cpufreq_driver); } module_init(powernv_cpufreq_init); Looks good. Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com ___ Linuxppc-dev mailing list

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

2015-05-04 Thread Preeti U Murthy
)) { + if (pmsr PMSR_PSAFE_ENABLE) { throttled = true; pr_info(Pstate set to safe frequency\n); } Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https

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

2015-05-04 Thread Preeti U Murthy
and frequency control disabled from OS ? Should we not have a check on (chips[i].throttled) before reporting an anomaly for these two scenarios as well just like you have for pmsr_pmax ? Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev

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

2015-05-04 Thread Preeti U Murthy
in addition to reporting throttling is setting the chip's throttled parameter to true. This should do right ? I don't see the need to call throttle_check() here. Regards Preeti U Murthy return 0; } @@ -527,6 +549,8 @@ static int init_chip_info(void) for (i = 0; i nr_chips; i

Re: [PATCH] tick-broadcast: Fix the printing of broadcast masks

2015-05-03 Thread Preeti U Murthy
Ping. Any comments on this patch ? Regards Preeti U Murthy On 04/28/2015 02:15 PM, Preeti U Murthy wrote: Today the number of bits of the broadcast masks that is output into /proc/timer_list is sizeof(unsigned long). This means that on machines with larger number of CPUs, the bitmasks of CPUs

[PATCH] tick-broadcast: Fix the printing of broadcast masks

2015-04-28 Thread Preeti U Murthy
the broadcast masks for the range of nr_cpu_ids into /proc/timer_list. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- kernel/time/timer_list.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index c82b03c

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

2015-04-23 Thread Preeti U Murthy
+ */ OPAL_MSG_TYPE_MAX, }; Besides the above nit, the patch looks good. Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc

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

2015-04-23 Thread Preeti U Murthy
U Murthy + } + break; + } + return 0; +} + +static struct notifier_block powernv_cpufreq_opal_nb = { + .notifier_call = powernv_cpufreq_occ_msg, + .next = NULL, + .priority = 0, +}; + static void powernv_cpufreq_stop_cpu

Re: [PATCH v6 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-20 Thread Preeti U Murthy
(opal_unregister_dump_region, OPAL_UNREGISTER_DUMP_REGION); Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-15 Thread Preeti U Murthy
, informing even a clueless user what can be done with this knob IMO. Regards Preeti U Murthy + + fastsleep_workaround_state = WORKAROUND_APPLYONCE; + + return count; +fail: + return -EIO; +} + +static DEVICE_ATTR(fastsleep_workaround_state, 0600

Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-14 Thread Preeti U Murthy
find too much value in having so much code for a simple 'on' knob. Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-14 Thread Preeti U Murthy
of your data structures: fastsleep_workaround_avail_states[] and the enum and the parsing of the input string in store_fastsleep_workaround_state() too. Regards Preeti U Murthy Thanks, Shreyas ___ Linuxppc-dev mailing list Linuxppc-dev

Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-14 Thread Preeti U Murthy
Nop the fastsleep_workaround_entry path This results in cpuX undoing the workaround on its core, never to set it back again. So should we protect the region between the beginning and end of patching instructions with get_online_cpus() and put_online_cpus() ? Regards Preeti U Murthy

Re: [PATCH v4 2/3] powerpc/powernv: Move cpuidle related code from setup.c to new file

2015-04-13 Thread Preeti U Murthy
On 04/14/2015 07:26 AM, Shreyas B. Prabhu wrote: This is a cleanup patch; doesn't change any functionality. Moves all cpuidle related code from setup.c to a new file. Signed-off-by: Shreyas B. Prabhu shre...@linux.vnet.ibm.com Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com Regards

Re: [PATCH V2] clockevents: Fix cpu down race for hrtimer based broadcasting

2015-04-02 Thread Preeti U Murthy
On 04/02/2015 04:12 PM, Ingo Molnar wrote: * Preeti U Murthy pre...@linux.vnet.ibm.com wrote: It was found when doing a hotplug stress test on POWER, that the machine either hit softlockups or rcu_sched stall warnings. The issue was traced to commit 7cba160ad789a powernv/cpuidle: Redesign

Re: [PATCH V2] clockevents: Fix cpu down race for hrtimer based broadcasting

2015-04-02 Thread Preeti U Murthy
On 04/02/2015 05:01 PM, Ingo Molnar wrote: * Preeti U Murthy pre...@linux.vnet.ibm.com wrote: On 04/02/2015 04:12 PM, Ingo Molnar wrote: * Preeti U Murthy pre...@linux.vnet.ibm.com wrote: It was found when doing a hotplug stress test on POWER, that the machine either hit softlockups

Re: [PATCH V2] clockevents: Fix cpu down race for hrtimer based broadcasting

2015-04-02 Thread Preeti U Murthy
, which in this case would turn into hotplug_cpu__tick_pull() or so? That way at least its clear wtf happens when. Okay. I'll resurrect the fix with a hotplug_cpu__tick_pull() name - agreed? Sounds good to me. This needs to be marked to stable also. Regards Preeti U Murthy

Re: [PATCH] powerpc: fix memory corruption by pnv_alloc_idle_core_states

2015-04-01 Thread Preeti U Murthy
int cpu_nr_cores(void) { - return NR_CPUS threads_shift; + return nr_cpu_ids threads_shift; } Thanks for the patch! Reviewed-by: Preeti U. Murthy pre...@linux.vnet.ibm.com static inline cpumask_t cpu_online_cores_map(void

[PATCH V2] clockevents: Fix cpu down race for hrtimer based broadcasting

2015-03-30 Thread Preeti U Murthy
an IPI and is definitely more complex than this immediate fix. Fixes: http://linuxppc.10917.n7.nabble.com/offlining-cpus-breakage-td88619.html Suggested-by: Thomas Gleixner t...@linutronix.de Signed-off-by: Preeti U. Murthy pre...@linux.vnet.ibm.com [Changelog drawn from: https://lkml.org/lkml/2015/2

[PATCH V2] tick/broadcast-hrtimer : Fix suspicious RCU usage in idle loop

2015-03-18 Thread Preeti U Murthy
non-idle. As an aside it is helpful to point out that the clock event device that is programmed here is not a per-cpu clock device; it is a pseudo clock device, used by the broadcast framework alone. The per-cpu clock device programming never goes through bc_set_next(). Signed-off-by: Preeti U

[RESEND PATCH] driver/cpuidle-powernv: Avoid endianness conversions while parsing DT

2015-02-18 Thread Preeti U Murthy
We currently read the information about idle states from the DT so as to populate the cpuidle table. Use those APIs to read from the DT that can avoid endianness conversions of the property values in the cpuidle driver. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Acked-by: Michael

Re: [PATCH V4] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-17 Thread Preeti U Murthy
On 02/18/2015 11:21 AM, Rafael J. Wysocki wrote: On Wednesday, February 18, 2015 10:13:23 AM Preeti U Murthy wrote: On 02/17/2015 11:23 PM, Rafael J. Wysocki wrote: On Tuesday, February 17, 2015 01:29:10 PM Preeti U Murthy wrote: Hi Rafael, Hi, Can you please pull this patch ? Sorry

Re: [PATCH V4] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-17 Thread Preeti U Murthy
On 02/17/2015 11:23 PM, Rafael J. Wysocki wrote: On Tuesday, February 17, 2015 01:29:10 PM Preeti U Murthy wrote: Hi Rafael, Hi, Can you please pull this patch ? Sorry, I wasn't sure whether or not the patch was for me to take and then I've been traveling lately. Applied now. Hi

Re: [PATCH V4] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-17 Thread Preeti U Murthy
Hi Rafael, Can you please pull this patch ? Another patch based on top of this is waiting to be pulled: [PATCH] driver/cpuidle-powernv: Avoid endianness conversions while parsing DT Regards Preeti U Murthy On 02/03/2015 11:50 AM, Preeti U Murthy wrote: The device tree now exposes the residency

Re: [PATCH V4] tick/hotplug: Handover time related duties before cpu offline

2015-02-16 Thread Preeti U Murthy
On 02/17/2015 07:28 AM, Michael Ellerman wrote: On Sat, 2015-01-31 at 09:44 +0530, Preeti U Murthy wrote: These duties include do_timer to update jiffies and broadcast wakeups on those platforms which do not have an external device to handle wakeup of cpus from deep idle states

Re: suspicious RCU usage clockevents_lock, tick_broadcast_lock, hrtimer_bases.lock

2015-02-15 Thread Preeti U Murthy
On 02/13/2015 07:56 PM, Paul E. McKenney wrote: On Fri, Feb 13, 2015 at 12:52:45PM +0530, Preeti U Murthy wrote: On 02/13/2015 10:57 AM, Preeti U Murthy wrote: On 02/13/2015 06:27 AM, Sam Bobroff wrote: Hello, I'm receiving this while booting a vanilla 3.19 kernel on a Power 8 machine

Re: suspicious RCU usage clockevents_lock, tick_broadcast_lock, hrtimer_bases.lock

2015-02-15 Thread Preeti U Murthy
On 02/16/2015 11:20 AM, Paul E. McKenney wrote: On Mon, Feb 16, 2015 at 08:49:12AM +0530, Preeti U Murthy wrote: On 02/13/2015 07:56 PM, Paul E. McKenney wrote: On Fri, Feb 13, 2015 at 12:52:45PM +0530, Preeti U Murthy wrote: On 02/13/2015 10:57 AM, Preeti U Murthy wrote: On 02/13/2015 06:27

[PATCH] tick/broadcast-hrtimer : Fix suspicious RCU usage in idle loop

2015-02-15 Thread Preeti U Murthy
with RCU_NONIDLE which informs RCU that the cpu is momentarily non-idle. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- kernel/time/tick-broadcast-hrtimer.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions

Re: suspicious RCU usage clockevents_lock, tick_broadcast_lock, hrtimer_bases.lock

2015-02-12 Thread Preeti U Murthy
On 02/13/2015 06:27 AM, Sam Bobroff wrote: Hello, I'm receiving this while booting a vanilla 3.19 kernel on a Power 8 machine: Does the below patch fix the issue ? From: Preeti U Murthy pre...@linux.vnet.ibm.com [PATCH] tick/hrtimer-broadcast: Fix a suspicious RCU usage in the tick

Re: suspicious RCU usage clockevents_lock, tick_broadcast_lock, hrtimer_bases.lock

2015-02-12 Thread Preeti U Murthy
On 02/13/2015 10:57 AM, Preeti U Murthy wrote: On 02/13/2015 06:27 AM, Sam Bobroff wrote: Hello, I'm receiving this while booting a vanilla 3.19 kernel on a Power 8 machine: Does the below patch fix the issue ? From: Preeti U Murthy pre...@linux.vnet.ibm.com [PATCH] tick/hrtimer

[PATCH] arch/cpuidle-powernv: Avoid endianness conversions while parsing DT

2015-02-02 Thread Preeti U Murthy
We currently read the information about idle states from the DT so as to find out the cpu idle states supported by the platform. Use those APIs to read from the DT that can avoid endianness conversions of the property values. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch

[PATCH V4] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-02 Thread Preeti U Murthy
does not expose residency values, use default values as a fallback mechanism. While at it, use better APIs to parse the powermgmt device tree node. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Acked-by: Stewart Smith stew...@linux.vnet.ibm.com Acked-by: Michael Ellerman m

[PATCH] driver/cpuidle-powernv: Avoid endianness conversions while parsing DT

2015-02-02 Thread Preeti U Murthy
We currently read the information about idle states from the DT so as to populate the cpuidle table. Use those APIs to read from the DT that can avoid endianness conversions of the property values in the cpuidle driver. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- This patch

Re: [PATCH V3] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-02 Thread Preeti U Murthy
On 02/02/2015 12:09 PM, Michael Ellerman wrote: On Mon, 2015-02-02 at 10:40 +0530, Preeti U Murthy wrote: The device tree now exposes the residency values for different idle states. Read these values instead of calculating residency from the latency values. The values exposed in the DT

[PATCH V3] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-02-01 Thread Preeti U Murthy
does not expose residency values, use default values as a fallback mechanism. While at it, use better APIs to parse the powermgmt device tree node so as to avoid endianness transformation. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from V2: https://lkml.org/lkml/2015/1/27

[PATCH V4] tick/hotplug: Handover time related duties before cpu offline

2015-01-30 Thread Preeti U Murthy
the broadcast timer upon itself so as to seamlessly continue both these operations. It fixes the bug reported here: http://linuxppc.10917.n7.nabble.com/offlining-cpus-breakage-td88619.html Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from V3: https://lkml.org/lkml/2015/1/20/236 1

Re: [PATCH] cpuidle/powernv: Enter fastsleep on checking if deep idle states are allowed

2015-01-29 Thread Preeti U Murthy
On 09/15/2014 02:22 PM, Preeti U Murthy wrote: On 09/15/2014 12:29 PM, Michael Ellerman wrote: On Fri, 2014-09-12 at 16:31 +0530, Preeti U Murthy wrote: Today the procfs interface /proc/sys/kernel/powersave-nap is used to control entry into deep idle states beyond snooze. Check for the value

Re: [PATCH V2] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-28 Thread Preeti U Murthy
On 01/28/2015 02:45 PM, Stewart Smith wrote: Preeti U Murthy pre...@linux.vnet.ibm.com writes: The device tree now exposes the residency values for different idle states. Read these values instead of calculating residency from the latency values. The values exposed in the DT are validated

Re: [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-28 Thread Preeti U Murthy
On 01/27/2015 09:01 AM, Preeti U Murthy wrote: On 01/22/2015 04:45 PM, Thomas Gleixner wrote: On Thu, 22 Jan 2015, Preeti U Murthy wrote: On 01/21/2015 05:16 PM, Thomas Gleixner wrote: How about when the cpu that is going offline receives a timer interrupt just before setting its state

Re: [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-28 Thread Preeti U Murthy
On 01/29/2015 03:01 AM, Richard Cochran wrote: On Wed, Jan 28, 2015 at 03:32:58PM +0530, Preeti U Murthy wrote: Thomas ping. Would you be posting this patch? FYI, Thomas is temporarily out of action, in bed with the flu. Oh I am sorry to hear that! Let me post out a patch based on Thomas's

[PATCH V2] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-27 Thread Preeti U Murthy
does not expose residency values, use default values as a fallback mechanism. While at it, handle some cleanups. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from V1: https://lkml.org/lkml/2015/1/19/221 1. Used a better API for reading the DT property values. 2. Code cleanups

Re: cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-26 Thread Preeti U Murthy
On 01/23/2015 10:29 AM, Michael Ellerman wrote: On Tue, 2015-20-01 at 11:26:49 UTC, Preeti U Murthy wrote: @@ -177,34 +178,39 @@ static int powernv_add_idle_states(void) return nr_idle_states; } -idle_state_latency = of_get_property(power_mgt

Re: [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-26 Thread Preeti U Murthy
On 01/22/2015 04:45 PM, Thomas Gleixner wrote: On Thu, 22 Jan 2015, Preeti U Murthy wrote: On 01/21/2015 05:16 PM, Thomas Gleixner wrote: How about when the cpu that is going offline receives a timer interrupt just before setting its state to CPU_DEAD ? That is still possible right given

Re: offlining cpus breakage

2015-01-21 Thread Preeti U Murthy
On 01/22/2015 10:59 AM, Michael Ellerman wrote: On Fri, 2015-01-16 at 14:40 +0530, Preeti U Murthy wrote: On 01/16/2015 02:26 PM, Preeti U Murthy wrote: On 01/16/2015 08:34 AM, Michael Ellerman wrote: On Fri, 2015-01-16 at 13:28 +1300, Alexey Kardashevskiy wrote: On 01/16/2015 02:22 AM

Re: [PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-21 Thread Preeti U Murthy
On 01/21/2015 05:16 PM, Thomas Gleixner wrote: On Tue, 20 Jan 2015, Preeti U Murthy wrote: diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 5544990..f3907c9 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -568,6 +568,7 @@ int

Re: [PATCH] idle/tick-broadcast: Exit cpu idle poll loop when cleared from tick_broadcast_force_mask

2015-01-21 Thread Preeti U Murthy
On 01/21/2015 03:26 PM, Thomas Gleixner wrote: On Tue, 20 Jan 2015, Preeti U Murthy wrote: On 01/20/2015 04:51 PM, Thomas Gleixner wrote: On Mon, 19 Jan 2015, Preeti U Murthy wrote: An idle cpu enters cpu_idle_poll() if it is set in the tick_broadcast_force_mask. This is so that it does

[PATCH V2] cpuidle: Add missing checks to the exit condition of cpu_idle_poll()

2015-01-21 Thread Preeti U Murthy
or tick_check_broadcast_expired() returns false, without setting the resched flag. So a cpu will be caught in cpu_idle_poll() needlessly, thereby wasting power. Add an explicit check on cpu_idle_force_poll and tick_check_broadcast_expired() to the exit condition of cpu_idle_poll() to avoid this. Signed-off-by: Preeti U

[PATCH V2] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-20 Thread Preeti U Murthy
it explicitly. It fixes the bug reported here: http://linuxppc.10917.n7.nabble.com/offlining-cpus-breakage-td88619.html Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from V1: https://lkml.org/lkml/2015/1/19/168 1. Modified the Changelog kernel/time/clockevents.c|2

[PATCH V3] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-20 Thread Preeti U Murthy
it explicitly. It fixes the bug reported here: http://linuxppc.10917.n7.nabble.com/offlining-cpus-breakage-td88619.html Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from previous versions: 1. Modification to the changelog 2. Clarified the comments kernel/time/clockevents.c

Re: cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-20 Thread Preeti U Murthy
On 01/20/2015 11:15 AM, Michael Ellerman wrote: On Mon, 2015-19-01 at 11:32:51 UTC, Preeti U Murthy wrote: The device tree now exposes the residency values for different idle states. Read these values instead of calculating residency from the latency values. The values exposed in the DT

Re: [PATCH] idle/tick-broadcast: Exit cpu idle poll loop when cleared from tick_broadcast_force_mask

2015-01-20 Thread Preeti U Murthy
On 01/20/2015 04:51 PM, Thomas Gleixner wrote: On Mon, 19 Jan 2015, Preeti U Murthy wrote: An idle cpu enters cpu_idle_poll() if it is set in the tick_broadcast_force_mask. This is so that it does not incur the overhead of entering idle states when it is expected to be woken up anytime

Re: tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-19 Thread Preeti U Murthy
On 01/20/2015 11:39 AM, Michael Ellerman wrote: On Mon, 2015-19-01 at 10:26:48 UTC, Preeti U Murthy wrote: Today if a cpu handling broadcasting of wakeups goes offline, it hands over It's *the* cpu handling broadcasting of wakeups right? ie. there's only ever one at a time. Right, thanks

[PATCH] tick/broadcast: Make movement of broadcast hrtimer robust against hotplug

2015-01-19 Thread Preeti U Murthy
phase so that it is visible to all cpus right after exiting stop_machine, which is when they can re-enter idle. This ensures that handover of the broadcast duty falls in place on offline, without having to do it explicitly. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- kernel/time

[PATCH] cpuidle/powernv: Read target_residency value of idle states from DT if available

2015-01-19 Thread Preeti U Murthy
does not expose residency values, use default values as a fallback mechanism. While at it, clump the common parts of device tree parsing into one chunk. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- drivers/cpuidle/cpuidle-powernv.c | 39 - 1

[PATCH] idle/tick-broadcast: Exit cpu idle poll loop when cleared from tick_broadcast_force_mask

2015-01-18 Thread Preeti U Murthy
power. Hence exit the idle poll loop if the tick_broadcast_force_mask gets cleared and enter idle states. Of course if the cpu has entered cpu_idle_poll() on being asked to poll explicitly, it continues to poll till it is asked to reschedule. Signed-off-by: Preeti U Murthy pre

Re: offlining cpus breakage

2015-01-18 Thread Preeti U Murthy
On 01/17/2015 07:09 PM, Preeti U Murthy wrote: On 01/16/2015 08:34 AM, Michael Ellerman wrote: On Fri, 2015-01-16 at 13:28 +1300, Alexey Kardashevskiy wrote: On 01/16/2015 02:22 AM, Preeti U Murthy wrote: Hi Alexey, Can you let me know if the following patch fixes the issue for you ? It did

Re: offlining cpus breakage

2015-01-17 Thread Preeti U Murthy
On 01/16/2015 08:34 AM, Michael Ellerman wrote: On Fri, 2015-01-16 at 13:28 +1300, Alexey Kardashevskiy wrote: On 01/16/2015 02:22 AM, Preeti U Murthy wrote: Hi Alexey, Can you let me know if the following patch fixes the issue for you ? It did for us on one of our machines that we were

Re: offlining cpus breakage

2015-01-16 Thread Preeti U Murthy
On 01/16/2015 08:34 AM, Michael Ellerman wrote: On Fri, 2015-01-16 at 13:28 +1300, Alexey Kardashevskiy wrote: On 01/16/2015 02:22 AM, Preeti U Murthy wrote: Hi Alexey, Can you let me know if the following patch fixes the issue for you ? It did for us on one of our machines that we were

Re: offlining cpus breakage

2015-01-16 Thread Preeti U Murthy
On 01/16/2015 02:26 PM, Preeti U Murthy wrote: On 01/16/2015 08:34 AM, Michael Ellerman wrote: On Fri, 2015-01-16 at 13:28 +1300, Alexey Kardashevskiy wrote: On 01/16/2015 02:22 AM, Preeti U Murthy wrote: Hi Alexey, Can you let me know if the following patch fixes the issue for you ? It did

Re: offlining cpus breakage

2015-01-15 Thread Preeti U Murthy
that there is to it. ---START PATCH-- tick/broadcast-hrtimer : Make movement of broadcast hrtimer robust against cpu offline From: Preeti U Murthy pre...@linux.vnet.ibm.com When a cpu on which the broadcast hrtimer is queued goes offline, the hrtimer needs to be moved

Re: [PATCH V2] tick-broadcast: Register for hrtimer based broadcast as the fallback broadcast mode

2014-12-08 Thread Preeti U Murthy
On 12/08/2014 04:18 PM, Mark Rutland wrote: Hi Preeti, On Mon, Dec 08, 2014 at 06:55:43AM +, Preeti U Murthy wrote: Commit 5d1638acb9f6 ('tick: Introduce hrtimer based broadcast') added a hrtimer based broadcast mode for those platforms in which local timers stop when CPUs enter deep

[PATCH V3] tick-broadcast: Register for hrtimer based broadcast as the fallback broadcast mode

2014-12-08 Thread Preeti U Murthy
. While at it, give a name to this mode of broadcast which was missing all along. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Tested-by: Mark Rutland mark.rutl...@arm.com --- Changes from V1: https://lkml.org/lkml/2014/12/5/261 1.Moved registering the hrtimer based broadcast from

Re: [PATCH] tick-broadcast: Register for hrtimer based broadcast as the default broadcast mode

2014-12-07 Thread Preeti U Murthy
managed to register itself as one. Let me send out a V2. Thanks Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH V2] tick-broadcast: Register for hrtimer based broadcast as the fallback broadcast mode

2014-12-07 Thread Preeti U Murthy
. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Changes from V1: https://lkml.org/lkml/2014/12/5/261 1.Moved registering the hrtimer based broadcast from timekeeping code to an early_initcall. arch/arm64/kernel/time.c |2 -- arch/powerpc/kernel/time.c |1

[PATCH] tick-broadcast: Register for hrtimer based broadcast as the default broadcast mode

2014-12-05 Thread Preeti U Murthy
the help of the broadcast clock device without checking for its existence. Registering a default broadcast mode will handle such buggy cases properly. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/arm64/kernel/time.c |2 -- arch/powerpc/kernel/time.c |1 - kernel

Re: [PATCH v2 0/4] powernv: cpuidle: Redesign idle states management

2014-11-25 Thread Preeti U Murthy
. The power numbers have very little variation between the runs with and without the patchset. Thanks Regards Preeti U Murthy On 11/25/2014 04:47 PM, Shreyas B. Prabhu wrote: Deep idle states like sleep and winkle are per core idle states. A core enters these states only when all the threads enter

Re: [PATCH] cpuidle/powernv: Re-enable fastsleep at boot time

2014-11-18 Thread Preeti U Murthy
Hi Joel, On 11/19/2014 08:04 AM, Joel Stanley wrote: Hey Preeti, On Tue, Nov 18, 2014 at 5:26 PM, Preeti U Murthy pre...@linux.vnet.ibm.com wrote: Commit dcb18694 Fix ipi on palmeto disabled fastsleep at boot time. I couldn't find this commit in any tree; upstream, mpe's next, nor

[PATCH] cpuidle/powernv: Re-enable fastsleep at boot time

2014-11-17 Thread Preeti U Murthy
Commit dcb18694 Fix ipi on palmeto disabled fastsleep at boot time. Revert this commit since we no longer need this fix. However we can continue to use powersave_nap parameter to control entry into deep idle states beyond snooze. Signed-off-by: Preeti U. Murthy pre...@linux.vnet.ibm.com

Re: [PATCH 3/4] powernv: cpuidle: Redesign idle states management

2014-11-11 Thread Preeti U Murthy
. As far as I see besides explaining the bits of core_idle_state structure and the purpose of lock bit the rest of the comments is redundant. A git-blame will let people know why all this is needed. The comment section should not be used up for this purpose IMO. Regards Preeti U Murthy

Re: [RFC 07/11] powerpc: kvm: the stopper func to cease secondary hwthread

2014-10-27 Thread Preeti U Murthy
as I can see with having a b . after nap. I mentioned that in one of my earlier replies to this patch. Regards Preeti U Murthy + +/* enter with vmode */ +kvmppc_secondary_stopper_exit: + /* fixme, restore the stack which we store on lpaca */ + + ld r0, 112+PPC_LR_STKOFF(r1

Re: [RFC 08/11] powerpc: kvm: add a flag in vcore to sync primary with secondry hwthread

2014-10-27 Thread Preeti U Murthy
to host. This cannot be trivially solved unless we can isolate these threads in some way. Regards Preeti U Murthy Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kvm_host.h | 3 +++ arch/powerpc/kernel/asm-offsets.c | 3 +++ arch/powerpc/kvm

Re: [RFC 09/11] powerpc: kvm: handle time base on secondary hwthread

2014-10-27 Thread Preeti U Murthy
have not taken care to migrate timers or tasks before entering guest as far as I observed. Hence we cannot just turn off time base like this and expect to handle the above mentioned events the next time the primary thread decides to exit to the host. Regards Preeti U Murthy + /* prevent us

Re: [RFC 11/11] powerpc: kvm: Kconfig add an option for enabling secondary hwthread

2014-10-27 Thread Preeti U Murthy
the rest :) The top patches won't compile without this one. Every patch in the patchset should be able to compile successfully without the aid of the patches that come after it. Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev

[PATCH] cpuidle/powernv: Fix return value of idle index in fastsleep

2014-10-27 Thread Preeti U Murthy
with reality except for the first entry. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Do we still need this workaround? Or can we get rid of the check on powersave_nap altogether? --- drivers/cpuidle/cpuidle-powernv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Warnings reported while building the vanilla kernel on powerpc

2014-10-27 Thread Preeti U Murthy
’ defined but not used [-Wunused-variable] static struct of_device_id ehea_module_device_table[] = { Thanks Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC 03/11] powerpc: kvm: add interface to control kvm function on a core

2014-10-26 Thread Preeti U Murthy
it? + return 0; +} #endif /* CONFIG_HOTPLUG_CPU */ Note that xics_migrate_irqs_away() is defined under CONFIG_CPU_HOTPLUG. But we will need this option on PowerKVM even when hotplug is not configured in. Regards Preeti U Murthy #ifdef CONFIG_SMP

Re: [RFC 04/11] powerpc: kvm: introduce a kthread on primary thread to anti tickless

2014-10-26 Thread Preeti U Murthy
are busy, scheduling ticks will fire and try to schedule a new task on them. Regards Preeti U Murthy Introduce a kthread (anti_tickless) on primary, so when there is only one vcpu thread on primary, the secondary can resort to anti_tickless to keep the primary out of tickless mode. (I thought

Re: [RFC 06/11] powerpc: kvm: introduce online in paca to indicate whether cpu is needed by host

2014-10-26 Thread Preeti U Murthy
at compile time, we resolve the flag. While booting, we look at the flag and decide whether to get the secondaries online. So we get the current behavior if we have not configured KVM_PPC_ENABLE_SECONDARY. Will this achieve the purpose of this patch? Regards Preeti U Murthy

  1   2   3   >