Re: [PATCH v2] powerpc/cpuidle: Set CPUIDLE_FLAG_POLLING for snooze state

2022-12-02 Thread Vaidyanathan Srinivasan
this > > is the correct version which is tested on powernv, pseries (shared and > > dedicated partitions) > > > > drivers/cpuidle/cpuidle-powernv.c | 5 - > > drivers/cpuidle/cpuidle-pseries.c | 8 ++-- > > 2 files changed, 10 insertions(+), 3 deletions(-) Hi Aboorva, Thanks for the patch. This fixes the unpredictable idle state selection issue under differ idle interval patterns. Reviewed-by: Vaidyanathan Srinivasan --Vaidy

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-24 Thread Vaidyanathan Srinivasan
* Michal Such?nek [2021-04-23 20:42:16]: > On Fri, Apr 23, 2021 at 11:59:30PM +0530, Vaidyanathan Srinivasan wrote: > > * Michal Such?nek [2021-04-23 19:45:05]: > > > > > On Fri, Apr 23, 2021 at 09:29:39PM +0530, Vaidyanathan Srinivasan wrote: > > > > * M

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-23 Thread Vaidyanathan Srinivasan
* Michal Such?nek [2021-04-23 19:45:05]: > On Fri, Apr 23, 2021 at 09:29:39PM +0530, Vaidyanathan Srinivasan wrote: > > * Michal Such?nek [2021-04-23 09:35:51]: > > > > > On Thu, Apr 22, 2021 at 08:37:29PM +0530, Gautham R. Shenoy wrote: > >

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-23 Thread Vaidyanathan Srinivasan
* Michal Such?nek [2021-04-23 09:35:51]: > On Thu, Apr 22, 2021 at 08:37:29PM +0530, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" > > > > Commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for > > CEDE(0)") sets the exit latency of CEDE(0) based on the latency values > > of th

Re: [PATCH] cpuidle/pseries: Fixup CEDE0 latency only for POWER10 onwards

2021-04-22 Thread Vaidyanathan Srinivasan
dcoded value of exit > latency, which is 10us. Though this is higher than the measured > values, we would be erring on the side of caution. > > Reported-by: Enrico Joedecke > Fixes: commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for > CEDE(0)") > Sig

Re: [PATCH v2] cpuidle-pseries: Fix CEDE latency conversion from tb to us

2020-09-03 Thread Vaidyanathan Srinivasan
s a warning in case we discover an extended-cede state with > wakeup latency to be 0. In such a case, ensure that CEDE(0) has a > non-zero wakeup latency. > > Fixes: commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for > CEDE(0)") > > Signed-off-by: Gautham

Re: [PATCH] Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check"

2020-08-26 Thread Vaidyanathan Srinivasan
states are enabled and tested on the P10 platform > with this fix. > > This reverts commit 8747bf36f312356f8a295a0c39ff092d65ce75ae. > > Fixes: 8747bf36f312 ("powerpc/powernv/idle: Replace CPU feature check with > PVR check") > Signed-off-by: Pratik Rajesh Samp

Re: [PATCH] powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10

2020-08-19 Thread Vaidyanathan Srinivasan
10 deep sleep code > (e.g., the BHRB restore) has been taken out, but it can be re-added > when stop > 3 support is added. > > Cc: Ryan P Grimm > Cc: Michael Neuling > Cc: Gautham R. Shenoy > Cc: Pratik Rajesh Sampat > Signed-off-by: Nicholas Piggin Tested-by: Vaidyanat

Re: [PATCH] powerpc: Fix P10 PVR revision in /proc/cpuinfo for SMT4 cores

2020-08-03 Thread Vaidyanathan Srinivasan
evision: 17.0 (pvr 0080 1100) > > Signed-off-by: Michael Neuling Reviewed-by: Vaidyanathan Srinivasan > --- > arch/powerpc/kernel/setup-common.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/kernel/setup-common.c > b/arch/pow

Re: [PATCH 5/5] cpuidle-pseries: Block Extended CEDE(1) which adds no additional value.

2020-07-19 Thread Vaidyanathan Srinivasan
nded CEDE(1) map to > the same hardware idle state. Since we already get SMT folding from > the normal CEDE, the Extended CEDE(1) doesn't provide any additional > value. This patch blocks Extended CEDE(1). > > Signed-off-by: Gautham R. Shenoy Reviewed-by: Vaidyanathan

Re: [PATCH 4/5] cpuidle-pseries : Include extended CEDE states in cpuidle framework

2020-07-19 Thread Vaidyanathan Srinivasan
.0th: 13648 > 99.5th: 14768 > 99.9th: 15664 > min=0, max=29812 > > With Patch: > Latency percentiles (usec) > 50.0th: 30 > 75.0th: 40 > 90.0th: 51 > 95.0th: 59 > *99.0th: 13616 > 99.5th: 14512 > 99.9th: 15696 &

Re: [PATCH 3/5] cpuidle-pseries : Fixup exit latency for CEDE(0)

2020-07-19 Thread Vaidyanathan Srinivasan
: 13104 > 99.5th: 14672 > 99.9th: 15824 > min=0, max=17993 > > With-patch: > Latency percentiles (usec) > 50.0th: 29 > 75.0th: 40 > 90.0th: 50 > 95.0th: 61 > *99.0th: 13648 > 99.5th: 14768 > 99.9th: 1

Re: [PATCH 2/5] cpuidle-pseries: Add function to parse extended CEDE records

2020-07-19 Thread Vaidyanathan Srinivasan
= 10 > [5.913183] xcede : Record 0 : hint = 1, latency =0x400 tb-ticks, > Wake-on-irq = 1 > [5.913188] xcede : Record 1 : hint = 2, latency =0x3e8000 tb-ticks, > Wake-on-irq = 0 > [5.913193] cpuidle : Skipping the 2 Extended CEDE idle states > > Signed-off-by: Gaut

Re: [PATCH 1/5] cpuidle-pseries: Set the latency-hint before entering CEDE

2020-07-19 Thread Vaidyanathan Srinivasan
cede states through the > cpuidle framework, where each of them will have a different > cede-latency hint. > > Signed-off-by: Gautham R. Shenoy Reviewed-by: Vaidyanathan Srinivasan > --- > drivers/cpuidle/cpuidle-pseries.c | 10 +- > 1 file changed, 9 insertion

Re: [PATCH 0/5] cpuidle-pseries: Parse extended CEDE information for idle.

2020-07-19 Thread Vaidyanathan Srinivasan
* Gautham R Shenoy [2020-07-07 16:41:34]: > From: "Gautham R. Shenoy" > > Hi, > > On pseries Dedicated Linux LPARs, apart from the polling snooze idle > state, we currently have the CEDE idle state which cedes the CPU to > the hypervisor with latency-hint = 0. > > However, the PowerVM hypervi

Re: [Skiboot] [PATCH v8 3/3] Self save API integration

2020-04-29 Thread Vaidyanathan Srinivasan
ing and usage. > > Signed-off-by: Pratik Rajesh Sampat Reviewed-by: Vaidyanathan Srinivasan > --- > doc/opal-api/opal-slw-self-save-reg-181.rst | 51 ++ > doc/opal-api/opal-slw-set-reg-100.rst | 5 + > doc/power-management.rs

Re: [PATCH v8 2/3] API to verify the STOP API and image compatibility

2020-04-29 Thread Vaidyanathan Srinivasan
SAD G. BRAHMASAMUDRA > Reviewed-by: Gregory S Still > Reviewed-by: Jennifer A Stofer > Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77614 > Tested-by: Jenkins OP Build CI > Tested-by: Jenkins OP HW > Reviewed-by: Daniel M Crowell > Signed-off-by: Pratik Rajesh

Re: [Skiboot] [PATCH v8 1/3] Self Save: Introducing Support for SPR Self Save

2020-04-29 Thread Vaidyanathan Srinivasan
hristian R. Geddes > Signed-off-by: Prem Shanker Jha > Signed-off-by: Akshay Adiga > Signed-off-by: Pratik Rajesh Sampat Reviewed-by: Vaidyanathan Srinivasan > 2. The commit also incorporates changes that make STOP API project > agnostic changes include defining wrapper functions whi

Re: [PATCH v5 3/3] powerpc/powernv: Parse device tree, population of SPR support

2020-03-18 Thread Vaidyanathan Srinivasan
* Pratik Rajesh Sampat [2020-03-17 19:40:18]: > Parse the device tree for nodes self-save, self-restore and populate > support for the preferred SPRs based what was advertised by the device > tree. > > Signed-off-by: Pratik Rajesh Sampat > Reviewed-by: Ram Pai Reviewe

Re: [PATCH v5 2/3] powerpc/powernv: Introduce Self save support

2020-03-18 Thread Vaidyanathan Srinivasan
le respecting it's preferences. > > This implementation allows mixing of support for the SPRs, which > means that a SPR can be self restored while another SPR be self saved if > they support and prefer it to be so. > > Signed-off-by: Pratik Rajesh Sampat > Reviewed-by: Ra

Re: [PATCH v5 1/3] powerpc/powernv: Interface to define support and preference for a SPR

2020-03-18 Thread Vaidyanathan Srinivasan
using the above interface and retains the > legacy functionality of self restore. > > Signed-off-by: Pratik Rajesh Sampat > Reviewed-by: Ram Pai Reviewed-by: Vaidyanathan Srinivasan > --- > arch/powerpc/platforms/powernv/idle.c | 316 +- > 1 file cha

Re: [PATCH v3 1/2] powerpc/vcpu: Assume dedicated processors as non-preempt

2019-12-06 Thread Vaidyanathan Srinivasan
werpc/mm/numa.c > index 50d68d21ddcc..ffb971f3a63c 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -1568,9 +1568,13 @@ int prrn_is_enabled(void) > return prrn_enabled; > } > > +DEFINE_STATIC_KEY_FALSE(shared_processor); > +EXPORT_SYMBOL_GPL(shared_processor); > + > void __init shared_proc_topology_init(void) > { > if (lppaca_shared_proc(get_lppaca())) { > + static_branch_enable(&shared_processor); > bitmap_fill(cpumask_bits(&cpu_associativity_changes_mask), > nr_cpumask_bits); > numa_update_cpu_topology(false); Reviewed-by: Vaidyanathan Srinivasan Thanks Srikar for the fix. --Vaidy

Re: [PATCH] powerpc/powernv/prd: Validate whether address to be mapped is part of system RAM

2019-10-04 Thread Vaidyanathan Srinivasan
* Jeremy Kerr [2019-10-04 11:27:46]: > Hi Vaidy, > > > The current topic is who owns setting up the ATT bits for that piece > > of memory. It is the kernel today. Kernel decides to set this up as > > normal memory or I/O memory and sets the bits in page table entry. > > > > > Or, what if ther

Re: [PATCH] powerpc/powernv/prd: Validate whether address to be mapped is part of system RAM

2019-10-03 Thread Vaidyanathan Srinivasan
* Jeremy Kerr [2019-10-03 15:07:24]: > Hi Vasant, > > > > OK. How about we just don't do that? > > > > Yes. Hostboot will fix that. It will make sure that HBRT is loaded > > into regular memory. > > Super. > > > > It sounds like we're just trying to work around an invalid > > > representation

Re: [PATCH] powerpc/powernv/prd: Validate whether address to be mapped is part of system RAM

2019-10-02 Thread Vaidyanathan Srinivasan
he PTE mapping. > CC: Aneesh Kumar K.V > CC: Jeremy Kerr > CC: Vaidyanathan Srinivasan > Signed-off-by: Vasant Hegde Signed-off-by: Vaidyanathan Srinivasan > --- > arch/powerpc/platforms/powernv/opal-prd.c | 16 +++- > 1 file changed, 15 insertions(+), 1 deletion(-) &

Re: [PATCH v2] powerpc/powernv: Add ultravisor message log interface

2019-08-28 Thread Vaidyanathan Srinivasan
* Claudio Carvalho [2019-08-24 23:19:19]: > > On 8/23/19 9:48 AM, Michael Ellerman wrote: > > Hi Claudio, > > Hi Michael, > > > > > Claudio Carvalho writes: > >> Ultravisor (UV) provides an in-memory console which follows the OPAL > >> in-memory console structure. > >> > >> This patch extends

Re: [PATCH] pseries/energy: Use OF accessor functions to read ibm,drc-indexes

2019-03-08 Thread Vaidyanathan Srinivasan
t; Fixes: commit e83636ac3334 ("pseries/drc-info: Search DRC properties for CPU > indexes") > Cc: #v4.16+ > Reported-by: Pavithra R. Prakash > Signed-off-by: Gautham R. Shenoy Reviewed-by: Vaidyanathan Srinivasan > --- > arch/powerpc/platforms/pseries/pseries_energy.

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

2018-04-25 Thread Vaidyanathan Srinivasan
if (gpstate_idx != gpstates->last_lpstate_idx) > queue_gpstate_timer(gpstates); > > + set_pstate(&freq_data); > spin_unlock(&gpstates->gpstate_lock); > - > - /* Timer may get migrated to a different cpu on cpu hot unplug */ > - smp_call_function_any(policy->cpus, set_pstate, &freq_data, 1); > } Fix looks good. Acked-by: Vaidyanathan Srinivasan

Re: [RESEND][PATCH] cpuidle/powernv : Restore different PSSCR for idle and hotplug

2018-03-06 Thread Vaidyanathan Srinivasan
* Benjamin Herrenschmidt [2018-03-01 08:40:22]: > On Thu, 2018-03-01 at 01:03 +0530, Akshay Adiga wrote: > > commit 1e1601b38e6e ("powerpc/powernv/idle: Restore SPRs for deep idle > > states via stop API.") uses stop-api provided by the firmware to restore > > PSSCR. PSSCR restore is required for

Re: [PATCH 3/3] powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead

2018-02-28 Thread Vaidyanathan Srinivasan
t; power9_idle_stop. > > This improves performance for ping-pong benchmark with the stop0_lite > idle state by 2.54% for 2 threads in the same core, and 2.57% for > different cores. > > Signed-off-by: Nicholas Piggin Reviewed-by: Vaidyanathan Srinivasan >

Re: [PATCH 1/3] powerpc/64s/idle: POWER9 implement a separate idle stop function for hotplug

2018-02-28 Thread Vaidyanathan Srinivasan
ggin Reviewed-by: Vaidyanathan Srinivasan > --- > arch/powerpc/include/asm/processor.h | 1 + > arch/powerpc/kernel/idle_book3s.S | 24 ++-- > arch/powerpc/platforms/powernv/idle.c | 2 +- > 3 files changed, 20 insertions(+), 7 deletions(-) > >

Re: [PATCH 2/3] powerpc/64s/idle: avoid sync for KVM state when waking from idle

2018-02-28 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-11-18 00:08:06]: > When waking from a CPU idle instruction (e.g., nap or stop), the sync > for ordering the KVM secondary thread state can be avoided if there > wakeup is coming from a kernel context rather than KVM context. > > This improves performance for ping-pong ben

Re: [PATCH 2/2] powerpc/64s: idle skip POWER9 DD1 and DD2.0 specific workarounds on DD2.1

2017-10-20 Thread Vaidyanathan Srinivasan
de and workarounds. > Cc: Vaidyanathan Srinivasan > Signed-off-by: Nicholas Piggin Reviewed-by: Vaidyanathan Srinivasan > --- > arch/powerpc/kernel/idle_book3s.S | 39 > --- > 1 file changed, 28 insertions(+), 11 deletions(-) >

Re: [PATCH] powerpc/powernv/idle: Round up latency and residency values

2017-08-24 Thread Vaidyanathan Srinivasan
* Michael Ellerman [2017-08-24 20:28:19]: > Vaidyanathan Srinivasan writes: > > > On PowerNV platforms, firmware provides exit latency and > > target residency for each of the idle states in nano > > seconds. Cpuidle framework expects the values in micro > >

[PATCH] powerpc/powernv/idle: Round up latency and residency values

2017-08-23 Thread Vaidyanathan Srinivasan
ned-off-by: Vaidyanathan Srinivasan --- drivers/cpuidle/cpuidle-powernv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index 42896a67aeae..5f3922392059 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++

Re: [PATCH] powerpc/pseries: energy driver only print message when LPAR guest

2017-07-21 Thread Vaidyanathan Srinivasan
* Michael Ellerman [2017-07-21 16:33:07]: > Vaidyanathan Srinivasan writes: > > * Nicholas Piggin [2017-07-21 11:16:44]: > >> diff --git a/arch/powerpc/platforms/pseries/pseries_energy.c > >> b/arch/powerpc/platforms/pseries/pseries_energy.c > >> ind

Re: [PATCH] powerpc/pseries: energy driver only print message when LPAR guest

2017-07-20 Thread Vaidyanathan Srinivasan
r do not print failure message > > This driver currently reports the H_BEST_ENERGY is unsupported (even > when booting in a non-LPAR environment). This is not something the > administrator can do much with, and not significant for debugging. > > Remove it. > > Si

Re: [PATCH] POWER9 PMU stops after idle workaround

2017-07-19 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-07-20 11:53:22]: > POWER9 DD2 PMU can stop after a state-loss idle in some conditions. > > A solution is to set then clear MMCRA[60] after wake from state-loss > idle. > > Signed-off-by: Nicholas Piggin Reviewed-by: Vaidyanathan Srinivasan >

Re: [PATCH 11/14] powerpc/64s: cpuidle read mostly for common globals

2017-06-12 Thread Vaidyanathan Srinivasan
* Gautham R Shenoy [2017-06-12 21:00:27]: > On Mon, Jun 12, 2017 at 09:58:32AM +1000, Nicholas Piggin wrote: > > Ensure these don't get put into bouncing cachelines. > > > > Signed-off-by: Nicholas Piggin > > Reviewed-by: Gautham R. Shenoy Revi

Re: [PATCH 12/14] powerpc/64s: cpuidle no memory barrier after break from idle

2017-06-12 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-06-12 09:58:33]: > A memory barrier is not required after the task wakes up, > only if we clear the polling flag before waking. The case > where we have work to do is the important one, so optimise > for it. > > Signed-off-by: Nicholas Piggin Reviewe

Re: [PATCH 13/14] powerpc/64: runlatch CTRL[RUN] set optimisation

2017-06-12 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-06-12 09:58:34]: > The CTRL register is read-only except bit 63 which is the run latch > control. This means it can be updated with a mtspr rather than > mfspr/mtspr. > > Signed-off-by: Nicholas Piggin Reviewed-by: Vaidyanathan Srinivasan > --- >

Re: [PATCH 14/14] powerpc/64s: idle runlatch switch is done with MSR[EE]=0

2017-06-12 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-06-12 09:58:35]: > 2*mfmsr and 2*mtmsr can be avoided in the idle sleep/wake code > because we know the MSR[EE] is clear. Good optimization for powernv. > Signed-off-by: Nicholas Piggin Acked-by: Vaidyanathan Srinivasan > --- > arch/powerpc/pl

Re: power server power consumption problem

2017-06-07 Thread Vaidyanathan Srinivasan
* ?? <1363017...@qq.com> [2017-06-06 19:59:24]: > I use ipmitool measuring power server power consumption, getting the > following results without total power consumption as the following picture, > do I add all power values as total power consumption? I am eager to receive > someone's

Re: [PATCH 1/3] cpuidle: powernv: Don't bounce between low and very low thread priority

2017-04-03 Thread Vaidyanathan Srinivasan
* Nicholas Piggin [2017-04-04 09:52:07]: > On Tue, 4 Apr 2017 07:54:12 +1000 > Anton Blanchard wrote: > > > From: Anton Blanchard > > > > The core of snooze_loop() continually bounces between low and very > > low thread priority. Changing thread priorities is an expensive > > operation that

Re: [PATCH 3/3] cpuidle: powernv: Avoid a branch in the core snooze_loop() loop

2017-04-03 Thread Vaidyanathan Srinivasan
the > other non idle threads on the core. > > Signed-off-by: Anton Blanchard Reviewed-by: Vaidyanathan Srinivasan > --- > drivers/cpuidle/cpuidle-powernv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpuidle/cpuidle-powernv.c

Re: [PATCH 2/3] cpuidle: powernv: Don't continually set thread priority in snooze_loop()

2017-04-03 Thread Vaidyanathan Srinivasan
-off-by: Anton Blanchard Reviewed-by: Vaidyanathan Srinivasan > --- > drivers/cpuidle/cpuidle-powernv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpuidle/cpuidle-powernv.c > b/drivers/cpuidle/cpuidle-powernv.c > index 9d9f164894eb..8c991c

Re: [PATCH 1/3] cpuidle: powernv: Don't bounce between low and very low thread priority

2017-04-03 Thread Vaidyanathan Srinivasan
All CPUs that can run PowerNV support very low priority, so we can > avoid the change completely. > > Signed-off-by: Anton Blanchard Reviewed-by: Vaidyanathan Srinivasan > --- > drivers/cpuidle/cpuidle-powernv.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/d

Re: [PATCH v2 1/2] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

2017-03-23 Thread Vaidyanathan Srinivasan
* Rafael J. Wysocki [2017-03-23 16:28:31]: > On Thu, Mar 23, 2017 at 4:22 PM, Vaidyanathan Srinivasan > wrote: > > drv->cpumask defaults to cpu_possible_mask in __cpuidle_driver_init(). > > On PowerNV platform cpu_present could be less than cpu_possible in cases > >

Re: [PATCH v2 2/2] cpuidle: Validate cpu_dev in cpuidle_add_sysfs

2017-03-23 Thread Vaidyanathan Srinivasan
* Rafael J. Wysocki [2017-03-23 16:27:31]: > On Thu, Mar 23, 2017 at 4:22 PM, Vaidyanathan Srinivasan > wrote: > > If a given cpu is not in cpu_present and cpu hotplug > > is disabled, arch can skip setting up the cpu_dev. > > > > Arch cpuidle driver should

[PATCH v2 2/2] cpuidle: Validate cpu_dev in cpuidle_add_sysfs

2017-03-23 Thread Vaidyanathan Srinivasan
] Registration of powernv driver failed. Signed-off-by: Vaidyanathan Srinivasan --- drivers/cpuidle/sysfs.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index c5adc8c..f2c3bce 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle

[PATCH v2 1/2] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

2017-03-23 Thread Vaidyanathan Srinivasan
e30] c000b564 ret_from_kernel_thread+0x5c/0x78 This patch fixes the bug by passing correct cpumask from powernv-cpuidle driver. Signed-off-by: Vaidyanathan Srinivasan --- drivers/cpuidle/cpuidle-powernv.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/cpuidle/cpui

[PATCH v1 0/2] cpuidle: Fixes in cpuidle driver

2017-03-23 Thread Vaidyanathan Srinivasan
ess incorrect address and crash. The following patch series fixes the cpuidle-powernv driver and also adds additional checks in cpuidle_add_sysfs() This patch set is against v4.11-rc3. Changed from v1: Updated commit message and comments. Signed-off-by: Vaidyanathan Srinivasan

Re: [PATCH] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

2017-03-22 Thread Vaidyanathan Srinivasan
* Michael Ellerman [2017-03-22 21:55:50]: > Vaidyanathan Srinivasan writes: > > * Michael Ellerman [2017-03-20 14:05:39]: > >> Vaidyanathan Srinivasan writes: > > > >> > On powernv platform cpu_present could be less than cpu_possible > >> > in

Re: [PATCH] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

2017-03-19 Thread Vaidyanathan Srinivasan
* Michael Ellerman [2017-03-20 14:05:39]: > Vaidyanathan Srinivasan writes: > > > * Michael Neuling [2017-03-18 16:28:02]: > > > >> Vaidy, > >> > >> Thanks for fixing this. > >> > >> > drv->cpumask defaults to cpu_po

[PATCH] cpuidle: Validate cpu_dev in cpuidle_add_sysfs

2017-03-18 Thread Vaidyanathan Srinivasan
. Signed-off-by: Vaidyanathan Srinivasan --- drivers/cpuidle/sysfs.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index c5adc8c..19dcf32 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c @@ -615,6 +615,18 @@ int

Re: [PATCH] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

2017-03-17 Thread Vaidyanathan Srinivasan
* Michael Neuling [2017-03-18 16:28:02]: > Vaidy, > > Thanks for fixing this. > > > drv->cpumask defaults to cpu_possible_mask in __cpuidle_driver_init(). > > This breaks cpuidle on powernv where sysfs files are not created for > > cpus in cpu_possible_mask that cannot be hot-added. > > I thin

[PATCH] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

2017-03-17 Thread Vaidyanathan Srinivasan
12c [c00ff1503e30] c000b564 ret_from_kernel_thread+0x5c/0x78 This patch fixes the issue by passing correct cpumask from powernv-cpuidle driver. Signed-off-by: Vaidyanathan Srinivasan --- drivers/cpuidle/cpuidle-powernv.c | 22 ++ 1 file changed, 22 inserti

[PATCH 1/2] powerpc/cpuhotplug: Force ESL=1 for offline cpus

2017-02-23 Thread Vaidyanathan Srinivasan
From: Gautham R. Shenoy ESL=1 losses some HYP SPR context and not idea for cpuidle, however can be used for offline cpus. Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Gautham R. Shenoy --- arch/powerpc/include/asm/cpuidle.h| 15 +++ arch/powerpc/platforms/powernv

[PATCH 2/2] powerpc/cpuhotplug: print psscr and srr1 value for debug

2017-02-23 Thread Vaidyanathan Srinivasan
This is a debug patch that helps trace various STOP state transitions and look at srr1 and psscr at wakeup. Signed-off-by: Vaidyanathan Srinivasan --- arch/powerpc/platforms/powernv/smp.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch

powerpc: Enable cpuhotplug with ESL=1 on POWER9

2017-02-23 Thread Vaidyanathan Srinivasan
The attached patch enables ESL=1 STOP2 for cpuhotplug. This is a debug patch that we could carry now until STOP states are discovered from device tree. Test run: [ 151.670021] CPU8 going offline with request psscr 003f0332 [ 151.719856] CPU 8 offline: Remove Rx thread [ 189.200410] CP

[PATCH] powerpc/xics: Adjust interrupt receive priority for offline cpus

2017-02-23 Thread Vaidyanathan Srinivasan
: Vaidyanathan Srinivasan --- arch/powerpc/sysdev/xics/xics-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 69d858e..c674a9d 100644 --- a/arch/powerpc/sysdev/xics/xics-common.c +++ b

Re: [PATCH] powerpc: cmp -> cmpd for 64-bit

2016-10-12 Thread Vaidyanathan Srinivasan
* Segher Boessenkool [2016-10-12 08:26:48]: > On Wed, Oct 12, 2016 at 02:05:19PM +1100, Michael Ellerman wrote: > > Segher Boessenkool writes: > > [snip] > > > > --- a/arch/powerpc/include/asm/cpuidle.h > > > +++ b/arch/powerpc/include/asm/cpuidle.h > > > @@ -26,7 +26,7 @@ extern u64 pnv_fir

Re: [PATCH] powernv: Load correct TOC pointer while waking up from winkle.

2016-08-08 Thread Vaidyanathan Srinivasan
* Benjamin Herrenschmidt [2016-08-06 08:38:53]: > On Fri, 2016-08-05 at 19:13 +0530, Mahesh J Salgaonkar wrote: > > From: Mahesh Salgaonkar > > > > The function pnv_restore_hyp_resource() loads the TOC into r2 from > > the invalid PACA pointer before fixing r13 value. This do not affect > > POW

Re: [PATCH] powernv: Load correct TOC pointer while waking up from winkle.

2016-08-07 Thread Vaidyanathan Srinivasan
s to be clear before accessing it as PACA to avoid loading invalid > values from invalid PACA pointer. > > Fix this by loading TOC after r13 register is corrected. > > Signed-off-by: Mahesh Salgaonkar Acked-by: Vaidyanathan Srinivasan > --- > arch/powerpc/kernel/idle_book3s.

[RESEND PATCH] powerpc/powernv: Fix vma page prot flags in opal-prd driver

2015-06-28 Thread Vaidyanathan Srinivasan
the driver This fix resolves the page accounting warning shown below: BUG: Bad rss-counter state mm:c007d34ac600 idx:1 val:19 The above warning is triggered since _PAGE_SPECIAL was incorrectly being set for the normal kernel COW pages. Signed-off-by: Vaidyanathan Srinivasan --- arch/powe

Re: [PATCH] powerpc/powernv: Fix vma page prot flags in opal-prd driver

2015-06-25 Thread Vaidyanathan Srinivasan
* Vaidyanathan Srinivasan [2015-06-25 11:45:46]: [snip] > Hi Ben, > > remap_pfn_range() is the correct method to map the firmware pages > because we will not have struct page associated with this RAM area. > > We do a memblock_reserve() in early boot and take out this me

Re: [PATCH] powerpc/powernv: Fix vma page prot flags in opal-prd driver

2015-06-24 Thread Vaidyanathan Srinivasan
* Vaidyanathan Srinivasan [2015-06-21 23:56:16]: > opal-prd driver will mmap() firmware code/data area as private > mapping to prd user space daemon. Write to this page will > trigger COW faults. The new COW pages are normal kernel RAM > pages accounted by the kernel and are

[PATCH] powerpc/powernv: Fix vma page prot flags in opal-prd driver

2015-06-21 Thread Vaidyanathan Srinivasan
the driver This fix resolves the page accounting warning shown below: BUG: Bad rss-counter state mm:c007d34ac600 idx:1 val:19 The above warning is triggered since _PAGE_SPECIAL was incorrectly being set for the normal kernel COW pages. Signed-off-by: Vaidyanathan Srinivasan --- arch/powe

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

2015-06-03 Thread Vaidyanathan Srinivasan
* Benjamin Herrenschmidt [2015-05-30 20:38:22]: > On Sat, 2015-05-30 at 11:31 +0530, Vaidyanathan Srinivasan wrote: > > In shared lpar case, spinning in guest context may potentially take > > away cycles from other lpars waiting to run on the same physical cpu. > > > &

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

2015-05-29 Thread Vaidyanathan Srinivasan
* Preeti U Murthy [2015-05-29 19:17:17]: [snip] > > + if (max_idle_state > 1) { > > + snooze_timeout_en = true; > > + snooze_timeout = cpuidle_state_table[1].target_residency * > > +tb_ticks_per_usec; > > + } > > Any idea why we don't have sno

[PATCH] powerpc/cpufreq: Add pr_warn() on OPAL firmware failures

2014-08-03 Thread Vaidyanathan Srinivasan
. Signed-off-by: Vaidyanathan Srinivasan --- Tested on powernv and pseries platforms with v3.16-rc7 kernel. drivers/cpufreq/powernv-cpufreq.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv

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

2014-08-03 Thread Vaidyanathan Srinivasan
Flags from device-tree need to be parsed with accessors for interpreting correct value in little-endian. Signed-off-by: Vaidyanathan Srinivasan --- drivers/cpuidle/cpuidle-powernv.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/cpuidle/cpuidle

Re: Kernel crash caused by cpufreq

2014-07-28 Thread Vaidyanathan Srinivasan
* Michael Ellerman [2014-07-28 17:03:10]: > On Fri, 2014-07-25 at 11:07 +1000, Gavin Shan wrote: > > I'm tracing one LSI interrupt issue on P8 box, and eventually into the > > following kernel crash. Not sure if there is one fix against this? :-) > > Vaidy wrote that I'm pretty sure (on CC). Ye

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Vaidyanathan Srinivasan
* Gautham R Shenoy [2014-03-27 15:00:50]: [snip] > > > + u32 len_ids, len_freqs; > > > + > > > + power_mgt = of_find_node_by_path("/ibm,opal/power-mgt"); > > > + if (!power_mgt) { > > > + pr_warn("power-mgt node not found\n"); > > > + return -ENODEV

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Vaidyanathan Srinivasan
* Gautham R Shenoy [2014-03-21 16:13:17]: > Hi Viresh, > > On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: > > On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy > > wrote: > > > From: Vaidyanathan Srinivasan > > > > Hi Vaidy, > &

[PATCH v1 1/2] powernv: cpufreq driver for powernv platform

2014-02-10 Thread Vaidyanathan Srinivasan
IBM POWER non-virtualized platforms. PState table is obtained from OPAL v3 firmware through device tree. powernv_cpufreq back-end driver would parse the relevant device-tree nodes and initialise the cpufreq subsystem on powernv platform. Signed-off-by: Vaidyanathan Srinivasan Signed-off-by:

[PATCH v1 2/2] powernv, cpufreq: Add per-core locking to serialize frequency transitions

2014-02-10 Thread Vaidyanathan Srinivasan
k and use the ones that belongs to the first thread sibling of the core. cpu_first_thread_sibling() macro is used to find the *common* lock for all thread siblings belonging to a core. Signed-off-by: Srivatsa S. Bhat Signed-off-by: Vaidyanathan Srinivasan --- drivers/cpufreq/powernv-cpufreq.c |

[PATCH v1 0/2] powernv: cpufreq support for IBM POWERNV platform

2014-02-10 Thread Vaidyanathan Srinivasan
): powernv, cpufreq: Add per-core locking to serialize frequency transitions Vaidyanathan Srinivasan (1): powernv: cpufreq driver for powernv platform arch/powerpc/include/asm/reg.h|4 + drivers/cpufreq/Kconfig.powerpc |9 + drivers/cpufreq/Makefile |1 drivers

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

2013-10-21 Thread Vaidyanathan Srinivasan
ame group. Signed-off-by: Preeti U Murthy Signed-off-by: Vaidyanathan Srinivasan --- kernel/sched/fair.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 828ed97..bbcd96b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fai

[PATCH 2/3] sched: Fix asymmetric scheduling for POWER7

2013-10-21 Thread Vaidyanathan Srinivasan
his domain has no idle cpu. Hence, nr_busy check against group weight can be removed. Reported-by: Michael Neuling Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Preeti U Murthy --- kernel/sched/fair.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sc

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

2013-10-21 Thread Vaidyanathan Srinivasan
CE comes before the check for ASYM_PACKING. Priority is given to avoid more than one busy thread in a core as much as possible before attempting asymmetric packing. Signed-off-by: Preeti U Murthy Signed-off-by: Vaidyanathan Srinivasan --- kernel/sched/fair.c | 19 +-- 1 f

[PATCH 0/3] sched: Fixes for task placement in SMT threads

2013-10-21 Thread Vaidyanathan Srinivasan
. This series applies on v3.12-rc6 and tested on x86 and powerpc. --Vaidy --- Preeti U Murthy (2): sched: Fix nohz_kick_needed to consider the nr_busy of the parent domain's group sched: Aggressive balance in domains whose groups share package resources Vaidyanathan Srinivas

[PATCH v2] powerpc: Default arch idle could cede processor on pseries

2013-09-05 Thread Vaidyanathan Srinivasan
ll the bells and whisles of cpuidle. Reported-by: Paul Mackerras Signed-off-by: Vaidyanathan Srinivasan Acked-by: Deepthi Dharwar Signed-off-by: Benjamin Herrenschmidt diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index c11c823..54b998f

[PATCH] powerpc: default arch idle could cede processor on pseries

2013-09-04 Thread Vaidyanathan Srinivasan
cpuidle in initialized. Reported-by: Paul Mackerras Signed-off-by: Vaidyanathan Srinivasan Acked-by: Deepthi Dharwar diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index c11c823..fd4f995 100644 --- a/arch/powerpc/platforms/pseries

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

2013-07-28 Thread Vaidyanathan Srinivasan
* Preeti U Murthy [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 always*. Say CPUX, wants the > >> broadcast CPU to wake it up at timeX. Since w

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

2013-07-28 Thread Vaidyanathan Srinivasan
* Benjamin Herrenschmidt [2013-07-27 16:30:05]: > 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 to

Re: [BUG][PATCH] powerpc: fix numa distance for form0 device tree

2013-03-22 Thread Vaidyanathan Srinivasan
* Vaidyanathan Srinivasan [2013-03-22 21:19:35]: [snip] > Prior to the above commit: > #define node_distance(from,to) > ((from) == (to) ? LOCAL_DISTANCE : REMOTE_DISTANCE) > > Restoring compatible behavior with this patch for old powerpc systems >

[BUG][PATCH] powerpc: fix numa distance for form0 device tree

2013-03-22 Thread Vaidyanathan Srinivasan
encoded as form0. Signed-off-by: Vaidyanathan Srinivasan diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index bba87ca..6a252c4 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -201,7 +201,7 @@ int __node_distance(int a, int b) int distance = LOCA

Re: [PATCH] powerpc: fix VMX fix for memcpy case

2012-10-06 Thread Vaidyanathan Srinivasan
8 7ca62850 7cc300d0 78c7e102 > 7cf01120 > [ 18.824923] 78c60660 39200010 39400020 39600030 <7e00200c> 7c0020ce > 38840010 409f001c > [ 18.824935] ---[ end trace 0bb95124affaaa45 ]--- > [ 18.825046] Unrecoverable VMX/Altivec Unavailable Exception f20 at > c0052d08 >

[PATCH v5 2/2] powerpc: add support for new hcall H_BEST_ENERGY

2010-10-06 Thread Vaidyanathan Srinivasan
Signed-off-by: Vaidyanathan Srinivasan --- arch/powerpc/include/asm/hvcall.h |3 arch/powerpc/platforms/pseries/Kconfig | 10 + arch/powerpc/platforms/pseries/Makefile |1 arch/powerpc/platforms/pseries/pseries_energy.c | 326 +++ 4

[PATCH v5 1/2] powerpc: cleanup APIs for cpu/thread/core mappings

2010-10-06 Thread Vaidyanathan Srinivasan
pu_core_index_of_thread(5) = 1 cpu_first_thread_of_core(1) = 4 cpu_core_index_of_thread() is used in cpu_to_drc_index() in the module and cpu_first_thread_of_core() is used in drc_index_to_cpu() in the module. Make API changes to few callers. Export symbols for use in modules. Signed-off-by: Vaidyanathan

[PATCH v5 0/2] powerpc: add support for new hcall H_BEST_ENERGY

2010-10-06 Thread Vaidyanathan Srinivasan
patch series is conservative and has more error checking in device tree parsing and drc index matching code than what may be required. Thanks, Vaidy --- Vaidyanathan Srinivasan (2): powerpc: cleanup APIs for cpu/thread/core mappings powerpc: add support for new hcall H_BEST_ENERGY

Re: [PATCH][RFC] preempt_count corruption across H_CEDE call with CONFIG_PREEMPT on pseries

2010-08-05 Thread Vaidyanathan Srinivasan
* Darren Hart [2010-08-05 19:19:00]: > On 07/22/2010 10:09 PM, Benjamin Herrenschmidt wrote: > > On Thu, 2010-07-22 at 21:44 -0700, Darren Hart wrote: > > > >> suggestion I updated the instrumentation to display the > >> local_save_flags and irqs_disabled_flags: > > > >> Jul 22 23:36:58 igoor

Re: [PATCH] powerpc: ONLINE to OFFLINE CPU state transition during removal

2010-08-05 Thread Vaidyanathan Srinivasan
* Nathan Fontenot [2010-07-26 14:13:35]: > On 07/22/2010 11:13 PM, Vaidyanathan Srinivasan wrote: > > * Robert Jennings [2010-07-22 21:43:44]: > > > >> If a CPU remove is attempted using the 'release' interface on hardware > >> which supports extende

Re: [PATCH][RFC] preempt_count corruption across H_CEDE call with CONFIG_PREEMPT on pseries

2010-08-05 Thread Vaidyanathan Srinivasan
* Darren Hart [2010-08-04 21:45:51]: > On 07/23/2010 12:07 AM, Vaidyanathan Srinivasan wrote: > >* Benjamin Herrenschmidt [2010-07-23 15:11:00]: > > > >>On Fri, 2010-07-23 at 10:38 +0530, Vaidyanathan Srinivasan wrote: > >>>Yes. extended_cede_processor() wi

Re: [PATCH v4 1/2] powerpc: cleanup APIs for cpu/thread/core mappings

2010-08-05 Thread Vaidyanathan Srinivasan
* Benjamin Herrenschmidt [2010-08-03 14:44:13]: > On Thu, 2010-07-22 at 06:27 +0530, Vaidyanathan Srinivasan wrote: > > These APIs take logical cpu number as input > > Change cpu_first_thread_in_core() to cpu_leftmost_thread_sibling() > > Change cpu_las

Re: [PATCH][RFC] preempt_count corruption across H_CEDE call with CONFIG_PREEMPT on pseries

2010-07-23 Thread Vaidyanathan Srinivasan
* Benjamin Herrenschmidt [2010-07-23 15:11:00]: > On Fri, 2010-07-23 at 10:38 +0530, Vaidyanathan Srinivasan wrote: > > Yes. extended_cede_processor() will return with interrupts enabled in > > the cpu. (This is done by the hypervisor). Under normal cases we > > cannot b

Re: [PATCH][RFC] preempt_count corruption across H_CEDE call with CONFIG_PREEMPT on pseries

2010-07-22 Thread Vaidyanathan Srinivasan
* Darren Hart [2010-07-22 21:44:04]: > On 07/22/2010 04:57 PM, Darren Hart wrote: > > On 07/22/2010 03:25 PM, Benjamin Herrenschmidt wrote: > >> On Thu, 2010-07-22 at 11:24 -0700, Darren Hart wrote: > >>> > >>> 1) How can the preempt_count() get mangled across the H_CEDE hcall? > >>> 2) Should we

Re: [PATCH] powerpc: ONLINE to OFFLINE CPU state transition during removal

2010-07-22 Thread Vaidyanathan Srinivasan
* Robert Jennings [2010-07-22 21:43:44]: > If a CPU remove is attempted using the 'release' interface on hardware > which supports extended cede, the CPU will be put in the INACTIVE state > rather than the OFFLINE state due to the default preferred_offline_state > in that situation. In the INACT

Re: [PATCH v3 2/2] powerpc: add support for new hcall H_BEST_ENERGY

2010-07-21 Thread Vaidyanathan Srinivasan
* Michael Neuling [2010-06-28 16:11:06]: [snip] > > These hints are abstract number given by the hypervisor based on > > the extended knowledge the hypervisor has regarding the current system > > topology and resource mappings. > > > > The activate and the deactivate part is for the two distinc

  1   2   >