[RFC PATCH 1/5] powerpc: Free up the IPI message slot of ipi call function (PPC_MSG_CALL_FUNC)

2013-07-25 Thread Preeti U Murthy
...@linux.vnet.ibm.com Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |2 +- arch/powerpc/kernel/smp.c | 12 +--- arch/powerpc/platforms/cell/interrupt.c |2 +- arch/powerpc/platforms/ps3/smp.c|2 +- 4 files changed, 8

[RFC PATCH 0/5] cpuidle/ppc: Timer offload framework to support deep idle states

2013-07-25 Thread Preeti U Murthy
makes use of the timer offload framework that the patches Patch[1/5] to Patch[4/5] build. --- Preeti U Murthy (3): cpuidle/ppc: Add timer offload framework to support deep idle states cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints cpuidle/ppc: Add longnap

[RFC PATCH 2/5] powerpc: Implement broadcast timer interrupt as an IPI message

2013-07-25 Thread Preeti U Murthy
efficiently. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |3 ++- arch/powerpc/kernel/smp.c | 19 +++ arch/powerpc/platforms/cell/interrupt.c |2

[RFC PATCH 3/5] cpuidle/ppc: Add timer offload framework to support deep idle states

2013-07-25 Thread Preeti U Murthy
. On a broadcast ipi the event handler for a timer interrupt is called on the cpu in deep idle state to handle the local events. The current design and implementation of the timer offload framework supports the ONESHOT tick mode but not the PERIODIC mode. Signed-off-by: Preeti U. Murthy pre

[RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-25 Thread Preeti U Murthy
disables tickless idle, is a system wide setting. Hence resort to an arch specific call to check if a cpu can go into tickless idle. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/kernel/time.c |5 + kernel/time/tick-sched.c |7 +++ 2 files changed, 12

[RFC PATCH 5/5] cpuidle/ppc: Add longnap state to the idle states on powernv

2013-07-25 Thread Preeti U Murthy
-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/processor_idle.c | 48 +++ 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/processor_idle.c b/arch/powerpc/platforms/powernv/processor_idle.c index

Re: [RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-25 Thread Preeti U Murthy
Hi Frederic, On 07/25/2013 07:00 PM, Frederic Weisbecker wrote: On Thu, Jul 25, 2013 at 02:33:02PM +0530, Preeti U Murthy wrote: In the current design of timer offload framework, the broadcast cpu should *not* go into tickless idle so as to avoid missed wakeups on CPUs in deep idle states

Re: [RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-25 Thread Preeti U Murthy
Hi Frederic, On 07/25/2013 07:00 PM, Frederic Weisbecker wrote: On Thu, Jul 25, 2013 at 02:33:02PM +0530, Preeti U Murthy wrote: In the current design of timer offload framework, the broadcast cpu should *not* go into tickless idle so as to avoid missed wakeups on CPUs in deep idle states

Re: [RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-25 Thread Preeti U Murthy
Hi Paul, On 07/26/2013 08:49 AM, Paul Mackerras wrote: On Fri, Jul 26, 2013 at 08:09:23AM +0530, Preeti U Murthy wrote: Hi Frederic, On 07/25/2013 07:00 PM, Frederic Weisbecker wrote: Hi Preeti, I'm not exactly sure why you can't enter the broadcast CPU in dynticks idle mode. I read

Re: [RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-25 Thread Preeti U Murthy
Hi Frederic, I apologise for the confusion. As Paul pointed out maybe the usage of the term lapic is causing a large amount of confusion. So please see the clarification below. Maybe it will help answer your question. On 07/26/2013 08:09 AM, Preeti U Murthy wrote: Hi Frederic, On 07/25/2013

[Resend RFC PATCH 0/5] cpuidle/ppc: Timer offload framework to support deep idle states

2013-07-25 Thread Preeti U Murthy
makes use of the timer offload framework that the patches Patch[1/5] to Patch[4/5] build. This patch series is being resent to clarify certain ambiguity in the patch descriptions from the previous post. Discussion around this: https://lkml.org/lkml/2013/7/25/754 --- Preeti U Murthy (3): cpuidle

[Resend RFC PATCH 2/5] powerpc: Implement broadcast timer interrupt as an IPI message

2013-07-25 Thread Preeti U Murthy
efficiently. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |3 ++- arch/powerpc/kernel/smp.c | 19 +++ arch/powerpc/platforms/cell/interrupt.c |2

[Resend RFC PATCH 3/5] cpuidle/ppc: Add timer offload framework to support deep idle states

2013-07-25 Thread Preeti U Murthy
is called on the cpu in deep idle state to handle the local events. The current design and implementation of the timer offload framework supports the ONESHOT tick mode but not the PERIODIC mode. Signed-off-by: Preeti U. Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/time.h

[Resend RFC PATCH 5/5] cpuidle/ppc: Add longnap state to the idle states on powernv

2013-07-25 Thread Preeti U Murthy
-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/processor_idle.c | 48 +++ 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/processor_idle.c b/arch/powerpc/platforms/powernv/processor_idle.c index

[Resend RFC PATCH 1/5] powerpc: Free up the IPI message slot of ipi call function (PPC_MSG_CALL_FUNC)

2013-07-25 Thread Preeti U Murthy
...@linux.vnet.ibm.com Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |2 +- arch/powerpc/kernel/smp.c | 12 +--- arch/powerpc/platforms/cell/interrupt.c |2 +- arch/powerpc/platforms/ps3/smp.c|2 +- 4 files changed, 8

[Resend RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-25 Thread Preeti U Murthy
disables tickless idle, is a system wide setting. Hence resort to an arch specific call to check if a cpu can go into tickless idle. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/kernel/time.c |5 + kernel/time/tick-sched.c |7 +++ 2 files changed, 12

Re: [RFC PATCH 0/5] cpuidle/ppc: Timer offload framework to support deep idle states

2013-07-26 Thread Preeti U Murthy
Hi Li, On 07/26/2013 03:35 PM, Li Yang-R58472 wrote: -Original Message- From: linux-pm-ow...@vger.kernel.org [mailto:linux-pm- ow...@vger.kernel.org] On Behalf Of Preeti U Murthy Sent: Thursday, July 25, 2013 5:03 PM To: b...@kernel.crashing.org; paul.gortma...@windriver.com

Re: [RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-27 Thread Preeti U Murthy
Hi Ben, On 07/27/2013 12:00 PM, Benjamin Herrenschmidt wrote: On Fri, 2013-07-26 at 08:09 +0530, Preeti U Murthy wrote: *The lapic of a broadcast CPU is active always*. Say CPUX, wants the broadcast CPU to wake it up at timeX. Since we cannot program the lapic of a remote CPU, CPUX will need

Re: [RFC PATCH 4/5] cpuidle/ppc: CPU goes tickless if there are no arch-specific constraints

2013-07-29 Thread Preeti U Murthy
Hi, On 07/29/2013 10:58 AM, Vaidyanathan Srinivasan wrote: * Preeti U Murthy pre...@linux.vnet.ibm.com [2013-07-27 13:20:37]: Hi Ben, On 07/27/2013 12:00 PM, Benjamin Herrenschmidt wrote: On Fri, 2013-07-26 at 08:09 +0530, Preeti U Murthy wrote: *The lapic of a broadcast CPU is active

Re: [PATCH V2 4/6] cpuidle/pseries: Move the pseries_idle backend driver to sysdev.

2013-07-30 Thread Preeti U Murthy
, but the low level handling of the entry into idle states should be taken care of by the architecture. Your recent patch : cpuidle: add freescale e500 family porcessors idle support IMO should hook onto the backend cpuidle driver that this patchset provides. Regards Preeti U Murthy

Re: [PATCH V2 4/6] cpuidle/pseries: Move the pseries_idle backend driver to sysdev.

2013-07-31 Thread Preeti U Murthy
Hi Dongsheng, On 07/31/2013 11:16 AM, Wang Dongsheng-B40534 wrote: Hi Preeti, -Original Message- From: Preeti U Murthy [mailto:pre...@linux.vnet.ibm.com] Sent: Wednesday, July 31, 2013 12:00 PM To: Wang Dongsheng-B40534 Cc: Deepthi Dharwar; b...@kernel.crashing.org; daniel.lezc

Re: [linux-pm] [PATCH 1/3] cpuidle/powernv: cpuidle backend driver for powernv

2013-08-02 Thread Preeti U Murthy
notifiers from other architectures into the cpuidle framework as well? Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[RFC V2 PATCH 0/6] cpuidle/ppc: Timer offload framework to support deep idle states

2013-08-14 Thread Preeti U Murthy
on powernv Patch[5/6]: Dynamically pick a broadcast CPU Patch[6/6]: Remove the constraint of having to disable tickless idle on the broadcast cpu, by queueing a hrtimer exclusively to do broadcast handling. --- Preeti U Murthy (4): cpuidle/ppc: Add timer offload framework to support deep idle

[RFC V2 PATCH 2/6] powerpc: Implement broadcast timer interrupt as an IPI message

2013-08-14 Thread Preeti U Murthy
efficiently. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |3 ++- arch/powerpc/kernel/smp.c | 19 +++ arch/powerpc/platforms/cell/interrupt.c |2

[RFC V2 PATCH 1/6] powerpc: Free up the IPI message slot of ipi call function (PPC_MSG_CALL_FUNC)

2013-08-14 Thread Preeti U Murthy
...@linux.vnet.ibm.com Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |2 +- arch/powerpc/kernel/smp.c | 12 +--- arch/powerpc/platforms/cell/interrupt.c |2 +- arch/powerpc/platforms/ps3/smp.c|2 +- 4 files changed, 8

[RFC V2 PATCH 3/6] cpuidle/ppc: Add timer offload framework to support deep idle states

2013-08-14 Thread Preeti U Murthy
interrupt is called on the cpu in deep idle state to handle the local events. The current design and implementation of the timer offload framework supports the ONESHOT tick mode but not the PERIODIC mode. Signed-off-by: Preeti U. Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/time.h

[RFC V2 PATCH 4/6] cpuidle/ppc: Add longnap state to the idle states on powernv

2013-08-14 Thread Preeti U Murthy
sleep on ppc. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/processor_idle.c | 48 +++ 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/processor_idle.c b/arch/powerpc/platforms

[RFC V2 PATCH 5/6] cpuidle/ppc: Enable dynamic movement of the broadcast functionality across CPUs

2013-08-14 Thread Preeti U Murthy
-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/time.h |1 arch/powerpc/kernel/time.c | 10 ++-- arch/powerpc/platforms/powernv/processor_idle.c | 56 +++ 3 files changed, 53 insertions(+), 14 deletions

[RFC V2 PATCH 6/6] cpuidle/ppc : Queue a hrtimer on bc_cpu, explicitly to do broadcast handling

2013-08-14 Thread Preeti U Murthy
In the current design we were depending on the timer interrupt on the bc_cpu to trigger broadcast handling. In tickless idle, timer interrupts could be many ticks away which could result in missed wakeups on CPUs in deep idle states. Disabling tickless idle on the bc_cpu is not good for

Re: [RFC V2 PATCH 2/6] powerpc: Implement broadcast timer interrupt as an IPI message

2013-08-21 Thread Preeti U Murthy
Hi Ben On 08/22/2013 08:40 AM, Benjamin Herrenschmidt wrote: On Wed, 2013-08-14 at 17:26 +0530, Preeti U Murthy wrote: -static irqreturn_t unused_action(int irq, void *data) +static irqreturn_t timer_action(int irq, void *data) { - /* This slot is unused and hence available for use

Re: [RFC V2 PATCH 3/6] cpuidle/ppc: Add timer offload framework to support deep idle states

2013-08-22 Thread Preeti U Murthy
Hi Ben, On 08/22/2013 08:57 AM, Benjamin Herrenschmidt wrote: On Wed, 2013-08-14 at 17:26 +0530, Preeti U Murthy wrote: static irqreturn_t timer_action(int irq, void *data) { -timer_interrupt(); +decrementer_timer_interrupt(); return IRQ_HANDLED; } I don't completely

Re: [RFC V2 PATCH 4/6] cpuidle/ppc: Add longnap state to the idle states on powernv

2013-08-22 Thread Preeti U Murthy
Hi Ben, On 08/22/2013 08:58 AM, Benjamin Herrenschmidt wrote: On Wed, 2013-08-14 at 17:26 +0530, Preeti U Murthy wrote: This patch hooks into the existing broadcast framework along with the support that this patchset introduces for ppc, and the cpuidle driver backend for powernv(posted out

[PATCH V3 1/6] powerpc: Free up the IPI message slot of ipi call function (PPC_MSG_CALL_FUNC)

2013-09-10 Thread Preeti U Murthy
...@linux.vnet.ibm.com Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |2 +- arch/powerpc/kernel/smp.c | 12 +--- arch/powerpc/platforms/cell/interrupt.c |2 +- arch/powerpc/platforms/ps3/smp.c|2 +- 4 files changed, 8

[PATCH V3 0/6] cpuidle/ppc: Enable broadcast support for deep idle states

2013-09-10 Thread Preeti U Murthy
for all their comments and suggestions so far. --- Preeti U Murthy (4): cpuidle/ppc: Split timer_interrupt() into timer handling and interrupt handling routines cpuidle/ppc: Add basic infrastructure to support the broadcast framework on ppc cpuidle/ppc: Introduce the deep idle

[PATCH V3 3/6] cpuidle/ppc: Split timer_interrupt() into timer handling and interrupt handling routines

2013-09-10 Thread Preeti U Murthy
() into routines performed during regular interrupt handling and __timer_interrupt(), which takes care of running local timers and collecting time related stats. Now on a broadcast ipi, call __timer_interrupt(). Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/kernel/time.c

[PATCH V3 2/6] powerpc: Implement broadcast timer interrupt as an IPI message

2013-09-10 Thread Preeti U Murthy
-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [Changelog modified by pre...@linux.vnet.ibm.com] Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |3 ++- arch/powerpc/include/asm/time.h |1 + arch/powerpc/kernel/smp.c

[PATCH V3 4/6] cpuidle/ppc: Add basic infrastructure to support the broadcast framework on ppc

2013-09-10 Thread Preeti U Murthy
the broadcast ipi, set the decrementers_next_tb to now before calling __timer_interrupt(). Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/Kconfig|1 + arch/powerpc/include/asm/time.h |1 + arch/powerpc/kernel/time.c | 69

[PATCH V3 6/6] cpuidle/ppc: Nominate new broadcast cpu on hotplug of the old

2013-09-10 Thread Preeti U Murthy
was about to fire on it. Therefore the newly nominated broadcast cpu should set the broadcast hrtimer on itself to expire immediately so as to not miss wakeups under such scenarios. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/time.h |1 + arch

[PATCH V3 5/6] cpuidle/ppc: Introduce the deep idle state in which the local timers stop

2013-09-10 Thread Preeti U Murthy
cycle repeats. Protect the region of nomination,de-nomination and check for existence of broadcast cpu with a lock to ensure synchronization between them. [1] tick_handle_oneshot_broadcast() or tick_handle_periodic_broadcast(). Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch

Re: [PATCH] powerpc/cpuidle: Fix parsing of idle state flags from device-tree

2014-08-03 Thread Preeti U Murthy
-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 ___ Linuxppc-dev mailing list Linuxppc-dev

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

2014-08-21 Thread Preeti U Murthy
() should be called in the reboot path generically. The latter might not be an enticing option for other platforms. Regards Preeti U Murthy Now the deal is how do we move to nominal frequency on reboot.. @Rafael: Any suggestions? How do we ensure that governors are stopped on these notifiers

[PATCH V2 0/2] cpufreq/powernv: Set core pstate to a minimum just before hotplugging it out

2014-09-05 Thread Preeti U Murthy
() to smp_call_function_single() in Patch[2/2] --- Preeti U Murthy (2): cpufreq: Allow stop CPU callback to be used by all cpufreq drivers powernv/cpufreq: Set the pstate of the last hotplugged out cpu in policy-cpus to minimum drivers/cpufreq/cpufreq.c |2 +- drivers/cpufreq/powernv-cpufreq.c

[PATCH V2 1/2] cpufreq: Allow stop CPU callback to be used by all cpufreq drivers

2014-09-05 Thread Preeti U Murthy
. The assumption is if the drivers find the GOV_STOP path to be a suitable way of implementing what they want to do with the freq of the cpu going offine,they will not implement the stop CPU callback at all. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- drivers/cpufreq/cpufreq.c |2

[PATCH V2 2/2] powernv/cpufreq: Set the pstate of the last hotplugged out cpu in policy-cpus to minimum

2014-09-05 Thread Preeti U Murthy
gets hotplugged out. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- drivers/cpufreq/powernv-cpufreq.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index 379c083..5a628f1 100644 --- a/drivers

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

2014-09-12 Thread Preeti U Murthy
Today the procfs interface /proc/sys/kernel/powersave-nap is used to control entry into deep idle states beyond snooze. Check for the value of this parameter before entering fastsleep. We already do this check for nap in power7_idle(). Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com

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

2014-09-15 Thread Preeti U Murthy
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 of this parameter before entering fastsleep. We

Re: powerpc: mitigate impact of decrementer reset

2014-10-08 Thread Preeti U Murthy
have the trace points usable, and it would hopefully result in less duplicated logic. I agree, this is perhaps the better approach. Regards Preeti U Murthy cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https

Re: [PATCH v2 2/3] powerpc/kvm/book3s_hv: Enable CPUs to run guest after waking up from fast-sleep

2014-10-09 Thread Preeti U Murthy
thread has restored it anyway. So we are safe. We will certainly add a comment there. Thanks Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] cpuidle/powernv: Populate cpuidle state details by querying the device-tree

2014-10-14 Thread Preeti U Murthy
...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman m...@ellerman.id.au Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Preeti U. Murthy pre...@linux.vnet.ibm.com Signed-off-by: Shreyas B. Prabhu shre...@linux.vnet.ibm.com --- drivers/cpuidle/cpuidle-powernv.c | 27

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

2014-10-22 Thread Preeti U Murthy
. This does not look right to me. 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

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: [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

[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] 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

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 1/2] sched: Remove unused mc_capable() and smt_capable()

2014-03-05 Thread Preeti U Murthy
get_mp_bus_to_node(int busnum); extern void set_mp_bus_to_node(int busnum, int node); 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 v2 3/6] powernv, cpufreq:Add per-core locking to serialize frequency transitions

2014-03-17 Thread Preeti U Murthy
)); + } rc = cpufreq_register_driver(powernv_cpufreq_driver); return rc; 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 v2 4/6] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-17 Thread Preeti U Murthy
struct freq_attr *powernv_cpu_freq_attr[] = { cpufreq_freq_attr_scaling_available_freqs, NULL, Reviewed-by: Preeti U Murthy pre...@linux.vnet.ibm.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org

Re: [PATCH v2 6/6] powernv:cpufreq: Implement the driver-get() method

2014-03-17 Thread Preeti U Murthy
-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

[PATCH 0/3] ppc:Set runlatch bits correctly for offline threads and vcpus

2014-04-11 Thread Preeti U Murthy
is aimed at ensuring that the runlatch bits are consisten with the utilization of a CPU under all circumstances. --- Preeti U Murthy (3): ppc/powernv: Set the runlatch bits correctly for offline cpus ppc/kvm: Set the runlatch bit of a CPU just before starting guest ppc/kvm: Clear

[PATCH 0/3] ppc:Set runlatch bits correctly for offline threads and vcpus

2014-04-11 Thread Preeti U Murthy
is aimed at ensuring that the runlatch bits are consisten with the utilization of a CPU under all circumstances. --- Preeti U Murthy (3): ppc/powernv: Set the runlatch bits correctly for offline cpus ppc/kvm: Set the runlatch bit of a CPU just before starting guest ppc/kvm: Clear

[PATCH 1/3] ppc/powernv: Set the runlatch bits correctly for offline cpus

2014-04-11 Thread Preeti U Murthy
to be cleared to indicate an unused CPU. Hence this patch has the runlatch bit cleared for an offline CPU just before entering an idle state and sets it immediately after it exits the idle state. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Acked-by: Paul Mackerras pau...@samba.org

[PATCH 2/3] ppc/kvm: Set the runlatch bit of a CPU just before starting guest

2014-04-11 Thread Preeti U Murthy
to be set to indicate that they are busy. The primary thread has its runlatch bit set though, but there is no harm in setting this bit once again. Hence set the runlatch bit for all threads before they start guest. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Acked-by: Paul Mackerras pau

[PATCH 3/3] ppc/kvm: Clear the runlatch bit of a vcpu before napping

2014-04-11 Thread Preeti U Murthy
When the guest cedes the vcpu or the vcpu has no guest to run it naps. Clear the runlatch bit of the vcpu before napping to indicate an idle cpu. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Acked-by: Paul Mackerras pau...@samba.org Reviewed-by: Srivatsa S. Bhat srivatsa.b

[PATCH] powerpc: Fix comment around arch specific definition of RECLAIM_DISTANCE

2014-05-04 Thread Preeti U Murthy
Commit 32e45ff43eaf5c17f changed the default value of RECLAIM_DISTANCE to 30. However the comment around arch specifc definition of RECLAIM_DISTANCE is not updated to reflect the same. Correct the value mentioned in the comment. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Cc: Anton

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Preeti U Murthy
loop? This will ensure that no matter what, before exiting timer interrupt handler we check for pending irq work. Regards Preeti U Murthy Signed-off-by: Anton Blanchard an...@samba.org Cc: sta...@vger.kernel.org # 3.14+ --- diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-10 Thread Preeti U Murthy
On 05/10/2014 09:56 AM, Benjamin Herrenschmidt wrote: On Fri, 2014-05-09 at 15:22 +0530, Preeti U Murthy wrote: in __timer_interrupt() outside the _else_ loop? This will ensure that no matter what, before exiting timer interrupt handler we check for pending irq work. We still need to make

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Preeti U Murthy
On 05/11/2014 03:55 AM, Benjamin Herrenschmidt wrote: On Sat, 2014-05-10 at 21:06 +0530, Preeti U Murthy wrote: On 05/10/2014 09:56 AM, Benjamin Herrenschmidt wrote: On Fri, 2014-05-09 at 15:22 +0530, Preeti U Murthy wrote: in __timer_interrupt() outside the _else_ loop? This will ensure

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Preeti U Murthy
On 05/11/2014 02:07 PM, Benjamin Herrenschmidt wrote: On Sun, 2014-05-11 at 13:45 +0530, Preeti U Murthy wrote: + /* Don't adjust the decrementer if some irq work is pending */ + if (!test_irq_work_pending()) + set_dec(evt); + else

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Preeti U Murthy
On 05/11/2014 02:33 PM, Benjamin Herrenschmidt wrote: On Sun, 2014-05-11 at 14:13 +0530, Preeti U Murthy wrote: Isn't this patch required too? @@ -503,12 +503,13 @@ void __timer_interrupt(void) now = *next_tb - now; if (now = DECREMENTER_MAX

[PATCH 0/6] ppc, kvm, cpuidle: Allow offline and kvm standby threads to enter fastsleep

2014-05-27 Thread Preeti U Murthy
Fast sleep is a deep idle state on Power8. The support for the state was added in commit 0d94873011. Today the idle threads in the host can potentially be put to fast sleep. But when we launch guests using kvm, the secondary threads are required to be offline and the offline threads are put to

[PATCH 1/6] powernv, cpuidle: Move the flags used for idle state discovery to powernv core

2014-05-27 Thread Preeti U Murthy
S. Bhat srivatsa.b...@linux.vnet.ibm.com [ Changelog added by pre...@linux.vnet.ibm.com ] Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/processor.h |4 drivers/cpuidle/cpuidle-powernv.c|7 +++ 2 files changed, 7 insertions(+), 4

[PATCH 2/6] powerpc, powernv, CPU hotplug: Put offline CPUs in Fast-Sleep instead of Nap

2014-05-27 Thread Preeti U Murthy
...@linux.vnet.ibm.com ] Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/include/asm/processor.h |8 + arch/powerpc/kernel/idle.c | 52 ++ arch/powerpc/platforms/powernv/smp.c | 12 +++- 3 files changed, 71

[PATCH 3/6] KVM: PPC: Book3S HV: Enable CPUs to run guest after waking up from fast-sleep

2014-05-27 Thread Preeti U Murthy
, add this check in the fastsleep wakeup path as well. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [ Changelog added by pre...@linux.vnet.ibm.com ] Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/kernel/exceptions-64s.S | 30

[PATCH 4/6] KVM: PPC: Book3S HV: Consolidate the idle-state enter sequence in KVM

2014-05-27 Thread Preeti U Murthy
power savings in a KVM scenario as well when an entire cpu core is idle. As a precursor, consolidate the code common across all idle states. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [ Changelog added by pre...@linux.vnet.ibm.com ] Signed-off-by: Preeti U Murthy pre

[PATCH 5/6] KVM: PPC: Book3S HV: Put KVM standby hwthreads to fast-sleep instead of nap

2014-05-27 Thread Preeti U Murthy
srivatsa.b...@linux.vnet.ibm.com [ Changelog added by pre...@linux.vnet.ibm.com ] Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 73 --- 1 file changed, 65 insertions(+), 8 deletions(-) diff --git a/arch/powerpc

[PATCH 6/6] ppc, book3s: Go back to same idle state after handling machine check interrupt

2014-05-27 Thread Preeti U Murthy
. Today they go back to nap by default. Signed-off-by: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com [ Changelog added by pre...@linux.vnet.ibm.com ] Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/kernel/exceptions-64s.S | 21 +++-- arch/powerpc/kernel

Re: [PATCH 1/2] powerpc/cpuidle: Only clear LPCR decrementer wakeup bit on fast sleep entry

2014-06-04 Thread Preeti U Murthy
this, the following line which clears the wakeup from external interrupt bit can be removed as well, since we are not clearing it anyway ? new_lpcr |= LPCR_PECE0 ^^^ Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev

[PATCH] powerpc/powernv: Check for IRQHAPPENED before sleeping

2014-06-30 Thread Preeti U Murthy
Commit 8d6f7c5a: powerpc/powernv: Make it possible to skip the IRQHAPPENED check in power7_nap() added code that prevents even cores which enter sleep on idle, from checking for pending interrupts. Fix this. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- arch/powerpc/kernel

[PATCH V2] powerpc/powernv: Check for IRQHAPPENED before sleeping

2014-06-30 Thread Preeti U Murthy
IPI complaining that the sleeping cpu is stuck. This patch fixes these issues by ensuring that cpus check for pending interrupts just before entering any idle state as long as they are not in the path of split core operations. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com Acked

[PATCH V3] powerpc/powernv: Check for IRQHAPPENED before sleeping

2014-07-01 Thread Preeti U Murthy
fixes ths issue by ensuring that cpus check for pending interrupts just before entering any idle state as long as they are not in the path of split core operations. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- Chanes in V2: https://lkml.org/lkml/2014/7/1/3 Modified the changelog

Re: [PATCH 1/3] sched: Fix nohz_kick_needed to consider the nr_busy of the parent domain's group

2013-10-22 Thread Preeti U Murthy
machine, there will be a CPU domain encompassing the socket and the MC domain will encompass a core. nohz_idle load balancer will kick in if both the threads in the core have tasks running on them. This is fair enough because the threads share the resources of the core. Regards Preeti U Murthy

Re: [PATCH 1/3] sched: Fix nohz_kick_needed to consider the nr_busy of the parent domain's group

2013-10-22 Thread Preeti U Murthy
the scalability issue. We also don't need to get to sd-parent to get the nr_busy parameter for the sake of nohz_kick_needed(). What do you think? Regards Preeti U Murthy This nohz stuff really needs to be re-thought and made more scalable -- its a royal pain :/ kernel/sched/core.c | 4

Re: [PATCH 1/3] sched: Fix nohz_kick_needed to consider the nr_busy of the parent domain's group

2013-10-22 Thread Preeti U Murthy
On 10/23/2013 09:30 AM, Preeti U Murthy wrote: Hi Peter, On 10/23/2013 03:41 AM, Peter Zijlstra wrote: On Mon, Oct 21, 2013 at 05:14:42PM +0530, Vaidyanathan Srinivasan wrote: kernel/sched/fair.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 1/3] sched: Fix nohz_kick_needed to consider the nr_busy of the parent domain's group

2013-10-23 Thread Preeti U Murthy
. sd_busy therefore is irrelevant for asymmetric load balancing. Regards Preeti U Murthy START_PATCH--- sched: Fix nohz_kick_needed() --- kernel/sched/core.c |4 kernel/sched/fair.c | 40 ++-- kernel/sched

Re: [PATCH 3/3] sched: Aggressive balance in domains whose groups share package resources

2013-10-23 Thread Preeti U Murthy
this a thought and get back. Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/3] sched: Fix nohz_kick_needed to consider the nr_busy of the parent domain's group

2013-10-24 Thread Preeti U Murthy
Hi Vincent, I have addressed your comments and below is the fresh patch. This patch applies on PATCH 2/3 posted in this thread. Regards Preeti U Murthy sched:Remove un-necessary iterations over sched domains to update/query nr_busy_cpus From: Preeti U Murthy pre...@linux.vnet.ibm.com

Re: [PATCH 3/3] sched: Aggressive balance in domains whose groups share package resources

2013-10-25 Thread Preeti U Murthy
this just at the SIBLINGS level? Having the hyper threads busy due to the scenario described in the changelog is bad for performance. Regards Preeti U Murthy ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo

Re: [PATCH 1/3] sched: Fix nohz_kick_needed to consider the nr_busy of the parent domain's group

2013-10-28 Thread Preeti U Murthy
Hi Peter, On 10/28/2013 07:20 PM, Peter Zijlstra wrote: On Thu, Oct 24, 2013 at 01:37:38PM +0530, Preeti U Murthy wrote: kernel/sched/core.c |5 + kernel/sched/fair.c | 38 -- kernel/sched/sched.h |1 + 3 files changed, 26 insertions

Re: [PATCH 3/3] sched: Aggressive balance in domains whose groups share package resources

2013-10-28 Thread Preeti U Murthy
Hi Peter, On 10/28/2013 09:23 PM, Peter Zijlstra wrote: On Mon, Oct 21, 2013 at 05:15:02PM +0530, Vaidyanathan Srinivasan wrote: From: Preeti U Murthy pre...@linux.vnet.ibm.com The current logic in load balance is such that after picking the busiest group, the load is attempted to be moved

[PATCH V2 0/2] sched: Cleanups,fixes in nohz_kick_needed()

2013-10-29 Thread Preeti U Murthy
domain-sd_busy where it is relevant. 3. Introduce sd_asym to represent the sched domain where asymmetric load balancing has to be done. --- Preeti U Murthy (1): sched: Remove un-necessary iteration over sched domains to update nr_busy_cpus Vaidyanathan Srinivasan (1): sched: Fix

[PATCH V2 2/2] sched: Remove un-necessary iteration over sched domains to update nr_busy_cpus

2013-10-29 Thread Preeti U Murthy
nr_busy_cpus parameter is used by nohz_kick_needed() to find out the number of busy cpus in a sched domain which has SD_SHARE_PKG_RESOURCES flag set. Therefore instead of updating nr_busy_cpus at every level of sched domain, since it is irrelevant, we can update this parameter only at the parent

  1   2   3   >