Re: [v2 PATCH] cpufreq: powernv: Correctly parse the sign of pstates on POWER8 vs POWER9

2017-12-10 Thread Gautham R Shenoy
Hi Balbir, On Fri, Dec 08, 2017 at 02:44:40PM +1100, Balbir Singh wrote: > On Thu, Dec 7, 2017 at 4:59 PM, Gautham R. Shenoy > <e...@linux.vnet.ibm.com> wrote: > > From: "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> > > > > On POWERNV

Re: [PATCH] cpufreq: powernv: Define methods to parse positive & negative pstates

2017-12-06 Thread Gautham R Shenoy
Hi Michael, On Wed, Dec 06, 2017 at 09:54:27PM +1100, Michael Ellerman wrote: > Shilpasri G Bhat <shilpa.b...@linux.vnet.ibm.com> writes: > > > From: "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> > > > > Pstates are 8bit values but on POWER8 they ar

[PATCH 0/2] powerpc: Scheduler optimization for POWER9 bigcores

2018-05-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> Hi, A pair of IBM POWER9 SMT4 cores can be fused together to form a big-core with 8 SMT threads. This can be discovered via the "ibm,thread-groups" CPU property in the device tree which will indicate which group of

[PATCH 1/2] powerpc: Detect the presence of big-core with interleaved threads

2018-05-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> A pair of IBM POWER9 SMT4 cores can be fused together to form a big-core with 8 SMT threads. This can be discovered via the "ibm,thread-groups" CPU property in the device tree which will indicate which group of threa

[PATCH 2/2] powerpc: Enable ASYM_SMT on interleaved big-core systems

2018-05-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> Each of the SMT4 cores forming a fused-core are more or less independent units. Thus when multiple tasks are scheduled to run on the fused core, we get the best performance when the tasks are spread across the pair of SM

Re: [PATCH 1/2] powerpc: Detect the presence of big-core with interleaved threads

2018-05-21 Thread Gautham R Shenoy
Hello Michael, On Fri, May 18, 2018 at 11:14:04PM +1000, Michael Ellerman wrote: > Gautham R Shenoy <e...@linux.vnet.ibm.com> writes: > ... > >> > @@ -565,7 +615,16 @@ void __init smp_setup_cpu_maps(void) > >> > vdso_data->processorCou

Re: [PATCH 1/2] powerpc: Detect the presence of big-core with interleaved threads

2018-05-21 Thread Gautham R Shenoy
Hello Michael, On Fri, May 18, 2018 at 11:21:22PM +1000, Michael Ellerman wrote: > "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> writes: > > > diff --git a/arch/powerpc/kernel/setup-common.c > > b/arch/powerpc/kernel/setup-common.c > > index 0af5c11..884d

Re: [PATCH 1/2] powerpc: Detect the presence of big-core with interleaved threads

2018-05-15 Thread Gautham R Shenoy
Hi Mikey, On Mon, May 14, 2018 at 01:21:11PM +1000, Michael Neuling wrote: > Thanks for posting this... A couple of comments below. Thanks for the review. Replies below. > > +/* > > + * check_for_interleaved_big_core - Checks if the core represented by > > + * dn is a big-core whose threads are

Re: [PATCH 2/2] powerpc: Enable ASYM_SMT on interleaved big-core systems

2018-05-15 Thread Gautham R Shenoy
On Mon, May 14, 2018 at 01:22:07PM +1000, Michael Neuling wrote: > On Fri, 2018-05-11 at 16:47 +0530, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" <e...@linux.vnet.ibm.com> > > > > Each of the SMT4 cores forming a fused-core are more or less >

[PATCH] cpuidle:powernv: Make the snooze timeout dynamic.

2018-05-31 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The commit 78eaa10f027c ("cpuidle: powernv/pseries: Auto-promotion of snooze to deeper idle state") introduced a timeout for the snooze idle state so that it could be eventually be promoted to a deeper idle state. The snooze timeout value is static a

Re: [PATCH] cpuidle:powernv: Make the snooze timeout dynamic.

2018-05-31 Thread Gautham R Shenoy
Hi Balbir, Thanks for reviewing the patch! On Fri, Jun 01, 2018 at 12:51:05AM +1000, Balbir Singh wrote: > On Thu, May 31, 2018 at 10:15 PM, Gautham R. Shenoy [..snip..] > > > > +static u64 get_snooze_timeout(struct cpuidle_device *dev, > > +

Re: [PATCH] cpuidle:powernv: Make the snooze timeout dynamic.

2018-06-05 Thread Gautham R Shenoy
Hello Michael, On Mon, Jun 04, 2018 at 09:27:40PM +1000, Michael Ellerman wrote: > "Gautham R. Shenoy" writes: > > > From: "Gautham R. Shenoy" > > > > The commit 78eaa10f027c ("cpuidle: powernv/pseries: Auto-promotion of > > snooze to

Re: [PATCH 1/3] powernv/cpuidle: Parse dt idle properties into global structure

2018-06-19 Thread Gautham R Shenoy
Hi Akshay, On Tue, Jun 19, 2018 at 10:34:26AM +0530, Akshay Adiga wrote: > Device-tree parsing happens in twice, once while deciding idle state to > be used for hotplug and once during cpuidle init. Hence, parsing the > device tree and caching it will reduce code duplication. Parsing code > has

Re: [PATCH 3/3] powernv/cpuidle: Use parsed device tree values for cpuidle_init

2018-06-19 Thread Gautham R Shenoy
Hi Akshay, On Tue, Jun 19, 2018 at 10:34:28AM +0530, Akshay Adiga wrote: > Export pnv_idle_states and nr_pnv_idle_states so that its accessible to > cpuidle driver. Use properties from pnv_idle_states structure for powernv > cpuidle_init. > > Signed-off-by: Akshay Adiga > --- >

Re: [PATCH 2/3] cpuidle/powernv: Change platform init to avoid reparsing dt

2018-06-19 Thread Gautham R Shenoy
Hi Akshay, On Tue, Jun 19, 2018 at 10:34:27AM +0530, Akshay Adiga wrote: > The required data is accessible from cpuidle_states structure and > nr_cpu_idle_states. This patch makes changes to avoid reparsing and use > data from these structures. > > Signed-off-by: Akshay Adiga > --- >

Re: [PATCH v3 1/2] powernv/cpuidle: Parse dt idle properties into global structure

2018-07-03 Thread Gautham R Shenoy
has been > moved to pnv_parse_cpuidle_dt() from pnv_probe_idle_states(). In addition > to the properties in the device tree the number of available states is > also required. > > Signed-off-by: Akshay Adiga > Reviewed-by: Nicholas Piggin Looks good. Reviewed-by: Gautham R. Shenoy

Re: [PATCH v3 2/2] powernv/cpuidle: Use parsed device tree values for cpuidle_init

2018-07-03 Thread Gautham R Shenoy
g the residency values in the kernel. Otherwise looks good to me. Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham.

[v2 PATCH 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores

2018-07-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" A pair of IBM POWER9 SMT4 cores can be fused together to form a big-core with 8 SMT threads. This can be discovered via the "ibm,thread-groups" CPU property in the device tree which will indicate which group of threads that share the L1 cach

[v2 PATCH 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-07-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

[v2 PATCH 0/2] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-07-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the second iteration of the patchset to add support for big-core on POWER9. The earlier version can be found here: https://lkml.org/lkml/2018/5/11/245. The changes from the previous version: - Added comments explaining the "ibm,thread

Re: [v3 PATCH 2/3] powernv-cpufreq: Fix pstate_to_idx() to handle non-continguous pstates

2018-01-10 Thread Gautham R Shenoy
Hi Rafael, On Wed, Jan 03, 2018 at 11:47:58PM +1100, Balbir Singh wrote: > On Wed, Jan 3, 2018 at 11:07 PM, Rafael J. Wysocki <r...@rjwysocki.net> wrote: > > On Monday, December 18, 2017 9:38:20 AM CET Gautham R Shenoy wrote: > >> Hi Balbir, > >> > >>

[PATCH v6 0/2] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-08-08 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the fifth iteration of the patchset to add support for big-core on POWER9. This patch also optimizes the task placement on such big-core systems. The previous versions can be found here: v5: https://lkml.org/lkml/2018/8/6/587 v4: https://lkm

[PATCH v6 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-08-08 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

Re: [RFC PATCH 3/3] cpuidle/powernv: Conditionally save-restore sprs using opal

2018-08-08 Thread Gautham R Shenoy
Hello Nicholas, On Fri, Aug 03, 2018 at 12:05:47AM +1000, Nicholas Piggin wrote: > On Thu, 2 Aug 2018 10:21:32 +0530 > Akshay Adiga wrote: > > > From: Abhishek Goel > > > > If a state has "opal-supported" compat flag in device-tree, an opal call > > needs to be made during the entry and exit

[PATCH v6 2/2] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores

2018-08-08 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Each of the SMT4 cores forming a big-core are more or less independent units. Thus when multiple tasks are scheduled to run on the fused core, we get the best performance when the tasks are spread across the pair of SMT4 cores. This patch achieves this

Re: [PATCH 2/2] powerpc/64s: reimplement book3s idle code in C

2018-08-09 Thread Gautham R Shenoy
alse; > + > + memset(, 0, sizeof(sprs)); > + > + if (!(psscr & (PSSCR_EC|PSSCR_ESL))) { > + BUG_ON(!mmu_on); > + > + /* > + * Wake synchronously. SRESET via xscom may still cause > + * a 0x100 powersave wakeup with SRR1 reason! > + */ > + srr1 = isa3_idle_stop_noloss(psscr); > + if (likely(!srr1)) > + return 0; > + We come here if if we were woken up from a ESL=0 stop by a xscom SRESET. Where would the SRESET be handled ? > + /* > + * Registers not saved, can't recover! > + * This would be a hardware bug > + */ > + BUG_ON((srr1 & SRR1_WAKESTATE) != SRR1_WS_NOLOSS); > + > + goto out; > + } > + The patch looks good otherwise, especially the idle_book3s.S :-) Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham.

Re: [RFC PATCH 0/3] New device-tree format and Opal based idle save-restore

2018-08-08 Thread Gautham R Shenoy
Hello Michael, On Tue, Aug 07, 2018 at 10:15:37PM +1000, Michael Ellerman wrote: > > Skiboot patch-set for device-tree is posted here : > > https://patchwork.ozlabs.org/project/skiboot/list/?series=58934 > > I don't see a device tree binding documented anywhere? > > There is an existing binding

[PATCH v5 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-08-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

Re: [PATCH v6 2/2] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores

2018-08-13 Thread Gautham R Shenoy
On Thu, Aug 09, 2018 at 06:26:57AM -0700, Srikar Dronamraju wrote: > * Gautham R. Shenoy [2018-08-09 11:02:08]: > > > > > 3) ppc64_cpu --smt=2 > >SMT domain ceases to exist as each domain consists of just one > >group. > > > > When seen in

Re: [PATCH v6 1/2] powerpc: Detect the presence of big-cores via "ibm,thread-groups"

2018-08-13 Thread Gautham R Shenoy
Hi Srikar, Thanks for reviewing the patch. On Thu, Aug 09, 2018 at 06:27:43AM -0700, Srikar Dronamraju wrote: > * Gautham R. Shenoy [2018-08-09 11:02:07]: > > > > > int threads_per_core, threads_per_subcore, threads_shift; > > +bool has_big_cores; > >

[PATCH v5 2/2] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores

2018-08-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Each of the SMT4 cores forming a big-core are more or less independent units. Thus when multiple tasks are scheduled to run on the fused core, we get the best performance when the tasks are spread across the pair of SMT4 cores. This patch achieves this

[PATCH v5 0/2] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-08-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the fifth iteration of the patchset to add support for big-core on POWER9. The previous versions can be found here: v4: https://lkml.org/lkml/2018/7/24/79 v3: https://lkml.org/lkml/2018/7/6/255 v2: https://lkml.org/lkml/2018/7/3/401 v1: https:

[PATCH v7 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-08-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

[PATCH v7 2/2] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores

2018-08-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Each of the SMT4 cores forming a big-core are more or less independent units. Thus when multiple tasks are scheduled to run on the fused core, we get the best performance when the tasks are spread across the pair of SMT4 cores. This patch achieves this

[PATCH v7 0/2] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-08-19 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the seventh iteration of the patchset to add support for big-core on POWER9. This patch also optimizes the task placement on such big-core systems. The previous versions can be found here: v6: https://lkml.org/lkml/2018/8/9/119 v5: https://lkm

[RESEND][PATCH] powerpc/powernv : Save/Restore SPRG3 on entry/exit from stop.

2018-07-17 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On 64-bit servers, SPRN_SPRG3 and its userspace read-only mirror SPRN_USPRG3 are used as userspace VDSO write and read registers respectively. SPRN_SPRG3 is lost when we enter stop4 and above, and is currently not restored. As a result, any read from S

Re: [RESEND][PATCH] powerpc/powernv : Save/Restore SPRG3 on entry/exit from stop.

2018-07-18 Thread Gautham R Shenoy
Hello Mikey, On Wed, Jul 18, 2018 at 09:24:19AM +1000, Michael Neuling wrote: > > > DEFINE(PPC_DBELL_SERVER, PPC_DBELL_SERVER); > > diff --git a/arch/powerpc/kernel/idle_book3s.S > > b/arch/powerpc/kernel/idle_book3s.S > > index d85d551..5069d42 100644 > > ---

[PATCH v2] powerpc/powernv : Save/Restore SPRG3 on entry/exit from stop.

2018-07-18 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On 64-bit servers, SPRN_SPRG3 and its userspace read-only mirror SPRN_USPRG3 are used as userspace VDSO write and read registers respectively. SPRN_SPRG3 is lost when we enter stop4 and above, and is currently not restored. As a result, any read from S

Re: [PATCH v3 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores

2018-07-15 Thread Gautham R Shenoy
rong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Gautham-R-Shenoy/powerpc-Detect-the-presence-of-big-cores-via-ibm-thread-groups/20180706-174756 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powe

[PATCH v4 0/2] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-07-24 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the fourth iteration of the patchset to add support for big-core on POWER9. The previous versions can be found here: v3: https://lkml.org/lkml/2018/7/6/255 v2: https://lkml.org/lkml/2018/7/3/401 v1: https://lkml.org/lkml/2018/5/11/245 Changes :

[PATCH v4 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores

2018-07-24 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" A pair of IBM POWER9 SMT4 cores can be fused together to form a big-core with 8 SMT threads. This can be discovered via the "ibm,thread-groups" CPU property in the device tree which will indicate which group of threads that share the L1 cach

[PATCH v4 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-07-24 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

Re: [RFC PATCH v2] powerpc/64s: Move idle code to powernv C code

2018-07-25 Thread Gautham R Shenoy
Hello Nicholas, On Sat, Jul 21, 2018 at 02:29:24PM +1000, Nicholas Piggin wrote: > Reimplement Book3S idle code to C, in the powernv platform code. > Assembly stubs are used to save and restore the stack frame and > non-volatile GPRs before going to idle, but these are small and > mostly agnostic

[PATCH] powerpc/powernv : Save/Restore SPRG3 on entry/exit from stop.

2018-07-17 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On 64-bit Servers, SPRN_SPRG3 and its userspace read-only mirror SPRN_USPRG3 are used as userspace VDSO write and read registers respectively. SPRN_SPRG3 is lost when we enter stop4 and above, and is currently not restored. As a result, any read from S

Re: [PATCH] powerpc/powernv : Save/Restore SPRG3 on entry/exit from stop.

2018-07-17 Thread Gautham R Shenoy
On Tue, Jul 17, 2018 at 04:57:29PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > On 64-bit Servers, SPRN_SPRG3 and its userspace read-only mirror > SPRN_USPRG3 are used as userspace VDSO write and read registers > respectively. > > SPRN_SP

Re: [v2 PATCH 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-07-04 Thread Gautham R Shenoy
Hello Murilo, Thanks for reviewing the patch. Replies inline. On Tue, Jul 03, 2018 at 02:16:55PM -0300, Murilo Opsfelder Araujo wrote: > On Tue, Jul 03, 2018 at 04:33:50PM +0530, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" > > > > On IBM POWER9, the

Re: [v2 PATCH 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores

2018-07-04 Thread Gautham R Shenoy
Hi Murilo, Thanks for the review. On Tue, Jul 03, 2018 at 02:53:46PM -0300, Murilo Opsfelder Araujo wrote: [..snip..] > > -/* Initialize CPU <=> thread mapping/ > > + if (has_interleaved_big_core) { > > + int key = __builtin_ctzl(CPU_FTR_ASYM_SMT); > > + > > +

[PATCH v3 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-07-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

[PATCH v3 0/2] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-07-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the third iteration of the patchset to add support for big-core on POWER9. The previous versions can be found here: v2: https://lkml.org/lkml/2018/7/3/401 v1: https://lkml.org/lkml/2018/5/11/245 Changes : v2 --> v3 - Set sane val

[PATCH v3 2/2] powerpc: Enable CPU_FTR_ASYM_SMT for interleaved big-cores

2018-07-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" A pair of IBM POWER9 SMT4 cores can be fused together to form a big-core with 8 SMT threads. This can be discovered via the "ibm,thread-groups" CPU property in the device tree which will indicate which group of threads that share the L1 cach

Re: [RFC PATCH] powerpc/64s: Move ISAv3.0 / POWER9 idle code to powernv C code

2018-07-10 Thread Gautham R Shenoy
Hello Nicholas, On Mon, Jul 09, 2018 at 12:24:36AM +1000, Nicholas Piggin wrote: > Reimplement POWER9 idle code in C, in the powernv platform code. > Assembly stubs are used to save and restore the stack frame and > non-volatile GPRs before going to idle, but these are small and > mostly

Re: [RFC PATCH] powerpc/64s: Move ISAv3.0 / POWER9 idle code to powernv C code

2018-07-11 Thread Gautham R Shenoy
On Wed, Jul 11, 2018 at 06:30:36PM +1000, Nicholas Piggin wrote: > On Tue, 10 Jul 2018 16:36:34 +0530 > Gautham R Shenoy wrote: > > > Hello Nicholas, > > > > > > On Mon, Jul 09, 2018 at 12:24:36AM +1000, Nicholas Piggin wrote: > > > Reimplement POWE

Re: [PATCH v3 1/2] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-07-11 Thread Gautham R Shenoy
Hello Murilo, On Sun, Jul 08, 2018 at 01:03:34PM -0300, Murilo Opsfelder Araujo wrote: > On Fri, Jul 06, 2018 at 02:35:48PM +0530, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" > > > > On IBM POWER9, the device tree exposes a property array identifed b

Re: [PATCH] powerpc/rtas: Fix a potential race between CPU-Offline & Migration

2018-10-01 Thread Gautham R Shenoy
On Fri, Sep 28, 2018 at 03:36:08PM -0500, Nathan Fontenot wrote: > On 09/28/2018 02:02 AM, Gautham R Shenoy wrote: > > Hi Nathan, > > > > On Thu, Sep 27, 2018 at 12:31:34PM -0500, Nathan Fontenot wrote: > >> On 09/27/2018 11:51 AM, Gautham R. Shenoy wrote:

Re: [PATCH] powerpc/rtas: Fix a potential race between CPU-Offline & Migration

2018-09-28 Thread Gautham R Shenoy
Hi Nathan, On Thu, Sep 27, 2018 at 12:31:34PM -0500, Nathan Fontenot wrote: > On 09/27/2018 11:51 AM, Gautham R. Shenoy wrote: > > From: "Gautham R. Shenoy" > > > > Live Partition Migrations require all the present CPUs to execute the > > H_JOIN call, and he

[PATCH v10 1/3] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-10-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

[PATCH v10 2/3] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores

2018-10-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" POWER9 SMT8 cores consist of two groups of threads, where threads in each group shares L1-cache. The scheduler is not aware of this distinction as the current sched-domain hierarchy has all the threads of the core defined at the SMT domain. SM

[PATCH v10 0/3] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-10-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the tenth iteration of the patchset to add support for big-core on POWER9. This patch also optimizes the task placement on such big-core systems. The previous versions can be found here: v9: https://lkml.org/lkml/2018/10/1/608 v8: https://lkm

[PATCH v10 3/3] powerpc/cacheinfo: Report the correct shared_cpu_map on big-cores

2018-10-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently on POWER9 SMT8 cores systems, in sysfs, we report the shared_cache_map for L1 caches (both data and instruction) to be the cpu-ids of the threads in SMT8 cores. This is incorrect since on POWER9 SMT8 cores there are two groups of threads, each of wh

[PATCH v2] powerpc/rtas: Fix a potential race between CPU-Offline & Migration

2018-10-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Live Partition Migrations require all the present CPUs to execute the H_JOIN call, and hence rtas_ibm_suspend_me() onlines any offline CPUs before initiating the migration for this purpose. The commit 85a88cabad57 ("powerpc/pseries: Disable CPU

[PATCH v9 1/3] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-10-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

[PATCH v9 0/3] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-10-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the ninth iteration of the patchset to add support for big-core on POWER9. This patch also optimizes the task placement on such big-core systems. The previous versions can be found here: v8: https://lkml.org/lkml/2018/9/20/899 v7: https://lkm

[PATCH v9 3/3] powerpc/sysfs: Add topology/smallcore_thread_siblings[_list]

2018-10-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" This patch adds two sysfs attributes named smallcore_thread_siblings and smallcore_thread_siblings_list to the "topology" attribute group for each CPU device. The read-only attributes /sys/device/system/cpu/cpuN/topology/smallcore_thread_siblings an

[PATCH v9 2/3] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores

2018-10-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" POWER9 SMT8 cores consist of two groups of threads, where threads in each group shares L1-cache. The scheduler is not aware of this distinction as the current sched-domain hierarchy has all the threads of the core defined at the SMT domain. SM

Re: [PATCH v9 0/3] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-10-03 Thread Gautham R Shenoy
Hello Dave, On Mon, Oct 01, 2018 at 07:05:11AM -0700, Dave Hansen wrote: > On 10/01/2018 06:16 AM, Gautham R. Shenoy wrote: > > > > Patch 3: Creates a pair of sysfs attributes named > > /sys/devices/system/cpu/cpuN/topology/smallcore_thread_siblings > >

Re: [PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-24 Thread Gautham R Shenoy
Hi Michael, On Mon, Sep 24, 2018 at 05:00:42PM +1000, Michael Ellerman wrote: > Nathan Fontenot writes: > > On 09/18/2018 05:32 AM, Gautham R Shenoy wrote: > >> Hi Nathan, > >> On Tue, Sep 18, 2018 at 1:05 AM Nathan Fontenot > >> wrote: > >>>

Re: [PATCH v8 0/3] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-09-22 Thread Gautham R Shenoy
Hi Dave, On Thu, Sep 20, 2018 at 11:04:54AM -0700, Dave Hansen wrote: > On 09/20/2018 10:22 AM, Gautham R. Shenoy wrote: > >- > >|L1 Cache | > >

Re: [PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-25 Thread Gautham R Shenoy
- X8- >From acb9eb9f8bb14cf3121aeb0589255cbc31292be7 Mon Sep 17 00:00:00 2001 From: "Gautham R. Shenoy" Date: Tue, 25 Sep 2018 11:01:18 +0530 Subject: [PATCH] powerpc/rtas: Fix a potential race between CPU-Offline & Migration commit 85a88cabad57 ("pow

Re: [PATCH v8 0/3] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-09-26 Thread Gautham R Shenoy
Hello Dave, On Tue, Sep 25, 2018 at 03:16:30PM -0700, Dave Hansen wrote: > On 09/22/2018 04:03 AM, Gautham R Shenoy wrote: > > Without this patchset, the SMT domain would be defined as the group of > > threads that share L2 cache. > > Could you try to make a more clear, co

[PATCH v8 3/3] powerpc/sysfs: Add topology/smallcore_thread_siblings[_list]

2018-09-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" This patch adds two sysfs attributes named smallcore_thread_siblings and smallcore_thread_siblings_list to the "topology" attribute group for each CPU device. The read-only attributes /sys/device/system/cpu/cpuN/topology/smallcore_thread_siblings an

[PATCH v8 2/3] powerpc: Use cpu_smallcore_sibling_mask at SMT level on bigcores

2018-09-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Each of the SMT4 cores forming a big-core are more or less independent units. Thus when multiple tasks are scheduled to run on the big-core, we get the best performance when the tasks are spread across the pair of SMT4 cores. This patch achieves this by setti

[PATCH v8 0/3] powerpc: Detection and scheduler optimization for POWER9 bigcore

2018-09-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the eight iteration of the patchset to add support for big-core on POWER9. This patch also optimizes the task placement on such big-core systems. The previous versions can be found here: v7: https://lkml.org/lkml/2018/8/20/52 v6: https://lkm

[PATCH v8 1/3] powerpc: Detect the presence of big-cores via "ibm, thread-groups"

2018-09-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On IBM POWER9, the device tree exposes a property array identifed by "ibm,thread-groups" which will indicate which groups of threads share a particular set of resources. As of today we only have one form of grouping identifying the group of

Re: [PATCH v8 1/3] powerpc: Detect the presence of big-cores via "ibm,thread-groups"

2018-09-21 Thread Gautham R Shenoy
work? -X8-- >From 6699ce205730d3d45ea79015751880740e9b Mon Sep 17 00:00:00 2001 From: "Gautham R. Shenoy" Date: Fri, 21 Sep 2018 22:43:05 +0530 Subject: [PATCH] powerpc/smp: Initialize thread_groups local variable Signed-off-b

Re: [PATCH v8 3/3] powerpc/sysfs: Add topology/smallcore_thread_siblings[_list]

2018-09-21 Thread Gautham R Shenoy
rong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Gautham-R-Shenoy/powerpc-Detection-and-scheduler-optimization-for-POWER9-bigcore/20180921-085812 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powe

[PATCH] powerpc/rtas: Fix a potential race between CPU-Offline & Migration

2018-09-27 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Live Partition Migrations require all the present CPUs to execute the H_JOIN call, and hence rtas_ibm_suspend_me() onlines any offline CPUs before initiating the migration for this purpose. The commit 85a88cabad57 ("powerpc/pseries: Disable CPU

Re: [PATCH] pseries/hotplug: Add more delay in pseries_cpu_die while waiting for rtas-stop

2019-01-16 Thread Gautham R Shenoy
Hello Michael, On Mon, Jan 14, 2019 at 12:11:44PM -0600, Michael Bringmann wrote: > On 1/9/19 12:08 AM, Gautham R Shenoy wrote: > > > I did some testing during the holidays. Here are the observations: > > > > 1) With just your patch (without any additional debug pa

Re: [PATCH] pseries/hotplug: Add more delay in pseries_cpu_die while waiting for rtas-stop

2018-12-07 Thread Gautham R Shenoy
On Fri, Dec 07, 2018 at 04:13:11PM +0530, Gautham R Shenoy wrote: > Hi Thiago, > > > Sure. I will test the patch and report back. I added the following debug patch on top of your patch, and after an hour's run, the system crashed. Appending the log at the end. I suppose w

Re: [PATCH] pseries/hotplug: Add more delay in pseries_cpu_die while waiting for rtas-stop

2018-12-07 Thread Gautham R Shenoy
Hi Thiago, On Thu, Dec 06, 2018 at 03:28:17PM -0200, Thiago Jung Bauermann wrote: [..snip..] > > > I posted a similar patch last year, but I wasn't able to arrive at a > root cause analysis like you did: > > https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-February/153734.html Ah! Nice.

[PATCH] pseries/hotplug: Add more delay in pseries_cpu_die while waiting for rtas-stop

2018-12-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently running DLPAR offline/online operations in a loop on a POWER9 system with SMT=off results in the following crash: [ 223.321032] cpu 112 (hwid 112) Ready to die... [ 223.355963] Querying DEAD? cpu 113 (113) shows 2 [ 223.356233] cpu 114 (hwid

Re: [PATCH] cpufreq: powernv: add of_node_put()

2018-11-26 Thread Gautham R Shenoy
Hello Yangtao Li, On Tue, Nov 20, 2018 at 07:57:31AM -0500, Yangtao Li wrote: > use of_node_put() to release the refcount. > Thanks for the patch. Reviewed-by: Gautham R. Shenoy > Signed-off-by: Yangtao Li > --- > drivers/cpufreq/powernv-cpufreq.c | 17 +++-- &g

Re: [PATCH] pseries/hotplug: Add more delay in pseries_cpu_die while waiting for rtas-stop

2019-01-08 Thread Gautham R Shenoy
Hello Thiago, Wish you a happy 2019! On Sat, Dec 08, 2018 at 12:40:52AM -0200, Thiago Jung Bauermann wrote: > > Gautham R Shenoy writes: > > On Fri, Dec 07, 2018 at 04:13:11PM +0530, Gautham R Shenoy wrote: > >> Sure. I will test the patch and report back. > > >

Re: [PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-18 Thread Gautham R Shenoy
Hi Nathan, On Tue, Sep 18, 2018 at 1:05 AM Nathan Fontenot wrote: > > When performing partition migrations all present CPUs must be online > as all present CPUs must make the H_JOIN call as part of the migration > process. Once all present CPUs make the H_JOIN call, one CPU is returned > to make

Re: [PATCH 1/2] cpuidle : auto-promotion for cpuidle states

2019-04-04 Thread Gautham R Shenoy
Hello Daniel, On Thu, Apr 4, 2019 at 3:52 PM Daniel Lezcano wrote: > > > Hi Abhishek, > > thanks for taking the time to test the different scenario and give us > the numbers. > > On 01/04/2019 07:11, Abhishek wrote: > > [.. snip..] > > In case of POWER, this is problematic, when the

Re: [PATCH] powerpc/watchdog: Use hrtimers for per-CPU heartbeat

2019-04-04 Thread Gautham R Shenoy
Hello Nicholas, On Tue, Apr 2, 2019 at 4:57 PM Nicholas Piggin wrote: > > Using a jiffies timer creates a dependency on the tick_do_timer_cpu > incrementing jiffies. If that CPU has locked up and jiffies is not > incrementing, the watchdog heartbeat timer for all CPUs stops and > creates false

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

2019-02-28 Thread Gautham R Shenoy
Hi Shilpa, On Thu, Feb 28, 2019 at 11:25:25AM +0530, Shilpasri G Bhat wrote: > Hi, > > On 02/28/2019 10:14 AM, Daniel Axtens wrote: > > Shilpasri G Bhat writes: > > > >> In POWER9, OCC(On-Chip-Controller) provides for hard and soft system > >> powercapping range. The hard powercap range is

Re: [PATCH v2] powerpc/pseries: Only wait for dying CPU after call to rtas_stop_self()

2019-02-28 Thread Gautham R Shenoy
Hello Thiago, On Fri, Feb 22, 2019 at 07:57:52PM -0300, Thiago Jung Bauermann wrote: > When testing DLPAR CPU add/remove on a system under stress, > pseries_cpu_die() doesn't wait long enough for a CPU to die: > > [ 446.983944] cpu 148 (hwid 148) Ready to die... > [ 446.984062] cpu 149 (hwid

Re: [PATCH v2] powerpc/powernv/idle: Restore IAMR after idle

2019-02-28 Thread Gautham R Shenoy
er use paca to save IAMR, instead use _DAR (thanks mpe) Looks good to me. Once we move to Nick Piggin's C-based save/restore code, we will be saving all these SPR values on the stack anyway. Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham.

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

2019-03-08 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" In cpu_to_drc_index() in the case when FW_FEATURE_DRC_INFO is absent, we currently use of_read_property() to obtain the pointer to the array corresponding to the property "ibm,drc-indexes". The elements of this array are of type __be32, but are

Re: [PATCH v3] powerpc/pseries: Only wait for dying CPU after call to rtas_stop_self()

2019-03-12 Thread Gautham R Shenoy
, the maximum time spent > inside the loop was was 10 ms. This patch loops for 20 ms just be sure. > > Signed-off-by: Thiago Jung Bauermann Thanks for this version. I have tested the patch and we no longer see the "Querying DEAD? cpu X (Y) shows 2" message. Tested-and-Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham.

Re: [PATCH v2] powerpc/watchdog: Use hrtimers for per-CPU heartbeat

2019-04-12 Thread Gautham R Shenoy
PUs stops and > creates false positives and confusing warnings on local CPUs, and > also causes the SMP detector to stop, so the root cause is never > detected. > > Fix this by using hrtimer based timers for the watchdog heartbeat, > like the generic kernel hardlockup detector. > >

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

2019-05-15 Thread Gautham R Shenoy
Hello Nicholas, On Thu, May 16, 2019 at 02:55:42PM +1000, Nicholas Piggin wrote: > Abhishek's on May 13, 2019 7:49 pm: > > On 05/08/2019 10:29 AM, Nicholas Piggin wrote: > >> Abhishek Goel's on April 22, 2019 4:32 pm: > >>> Currently, the cpuidle governors determine what idle state a idling CPU

Re: [PATCH v3] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt()

2019-06-03 Thread Gautham R Shenoy
Hi, On Wed, May 15, 2019 at 01:15:52PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > The calls to arch_add_memory()/arch_remove_memory() are always made > with the read-side cpu_hotplug_lock acquired via > memory_hotplug_begin(). On p

Re: [PATCH 2/3] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-06-13 Thread Gautham R Shenoy
e tree potentially is inconsistent. > > Fixes: 410bccf97881 ("powerpc/pseries: Partition migration in the kernel") > Signed-off-by: Nathan Lynch Audited the callbacks of of_reconfig_notify(). We are fine with respect to CPU-Hotplug locking. Reviewed-by: Gautham R. Shenoy &g

Re: [PATCH 1/3] powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild

2019-06-13 Thread Gautham R Shenoy
ne must be blocked by callers; enforce this. > > Fixes: 410bccf97881 ("powerpc/pseries: Partition migration in the kernel") > Signed-off-by: Nathan Lynch Reviewed-by: Gautham R. Shenoy > --- > arch/powerpc/kernel/cacheinfo.c | 21 + > arch/powerpc/k

[PATCH v3] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt()

2019-05-15 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The calls to arch_add_memory()/arch_remove_memory() are always made with the read-side cpu_hotplug_lock acquired via memory_hotplug_begin(). On pSeries, arch_add_memory()/arch_remove_memory() eventually call resize_hpt() which in turn calls stop_machi

Re: [RESEND PATCH] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt

2019-05-14 Thread Gautham R Shenoy
Hi Michael, On Tue, May 14, 2019 at 05:00:19PM +1000, Michael Ellerman wrote: > "Gautham R. Shenoy" writes: > > From: "Gautham R. Shenoy" > > > > During a memory hotplug operations involving resizing of the HPT, we > > invoke a stop_machine()

Re: [RESEND PATCH] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt

2019-05-14 Thread Gautham R Shenoy
On Tue, May 14, 2019 at 05:02:16PM +1000, Michael Ellerman wrote: > "Gautham R. Shenoy" writes: > > From: "Gautham R. Shenoy" > > > > Subject: Re: [RESEND PATCH] powerpc/pseries: Fix cpu_hotplug_lock > > acquisition in resize_hpt > > ps.

[RESEND PATCH] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt

2019-05-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" During a memory hotplug operations involving resizing of the HPT, we invoke a stop_machine() to perform the resizing. In this code path, we end up recursively taking the cpu_hotplug_lock, first in memory_hotplug_begin() and then subsequently in st

[PATCH] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt

2019-05-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" During a memory hotplug operations involving resizing of the HPT, we invoke a stop_machine() to perform the resizing. In this code path, we end up recursively taking the cpu_hotplug_lock, first in memory_hotplug_begin() and then subsequently in st

<    1   2   3   4   5   6   7   >