Re: Build failure in -next due to 'sh: thin archives fix linking'

2017-06-29 Thread Nicholas Piggin
On Fri, 30 Jun 2017 00:36:42 +0900 Masahiro Yamada wrote: > Hi. > > 2017-06-28 23:02 GMT+09:00 Guenter Roeck : > > On 06/28/2017 05:58 AM, Nicholas Piggin wrote: > >> > >> On Wed, 28 Jun 2017 05:38:50 -0700 > >> Guenter Roeck wrote: > >>

Re: [linux-next] cpus stalls detected few hours after booting next kernel

2017-06-29 Thread Nicholas Piggin
On Thu, 29 Jun 2017 20:23:05 +1000 Nicholas Piggin wrote: > On Thu, 29 Jun 2017 19:36:14 +1000 > Nicholas Piggin wrote: > > I don't *think* the replay-wakeup-interrupt patch is directly involved, but > > it's likely to be one of the idle patches. Okay this tu

Re: [linux-next] cpus stalls detected few hours after booting next kernel

2017-06-29 Thread Nicholas Piggin
On Thu, 29 Jun 2017 19:36:14 +1000 Nicholas Piggin wrote: > I've seen this as well (or something like it) in mambo at boot, but > it's pretty rare to hit. I'm trying to debug it. > > I'm guessing possibly an idle vs interrupt race. > > > [ 4255

Re: [linux-next] cpus stalls detected few hours after booting next kernel

2017-06-29 Thread Nicholas Piggin
I've seen this as well (or something like it) in mambo at boot, but it's pretty rare to hit. I'm trying to debug it. I'm guessing possibly an idle vs interrupt race. > [ 4255.151192] Sending NMI from CPU 5 to CPUs 0: > [ 4255.151246] NMI backtrace for cpu 0 > [ 4255.151287] CPU: 0 PID: 0 Comm: sw

Re: Build failure in -next due to 'sh: thin archives fix linking'

2017-06-28 Thread Nicholas Piggin
On Wed, 28 Jun 2017 05:38:50 -0700 Guenter Roeck wrote: > Hi, > > I see the following build error in -next when building > sh:rts7751r2dplus_defconfig. > > sh4-linux-ld: arch/sh/kernel/vsyscall/vsyscall-dummy.o: compiled for a big > endian system and target is little endian > sh4-linux-ld: ar

Re: [PATCH] powernv:idle: Clear r12 on wakeup from stop lite

2017-06-27 Thread Nicholas Piggin
ke the best fix. Really minor nitpick but you could adjust the line widths on the comment slightly (mpe might do that when merging). Reviewed-by: Nicholas Piggin > --- > arch/powerpc/kernel/idle_book3s.S | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/arch

[PATCH] cpuidle: menu: allow state 0 to be disabled

2017-06-25 Thread Nicholas Piggin
ld be -EINVAL if it is attempted, but this is the minimal fix). Acked-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin --- Hi Rafael, This patch is helpful when measuring power draw of polling, latency cost of idle states, etc. Please consider merging if you agree. Thanks, Nick drivers/cp

Re: linux-next: build failure after merge of most trees

2017-06-22 Thread Nicholas Piggin
On Thu, 22 Jun 2017 10:29:23 -0400 (EDT) David Miller wrote: > From: David Miller > Date: Thu, 22 Jun 2017 10:13:06 -0400 (EDT) > > > From: Nicholas Piggin > > Date: Thu, 22 Jun 2017 18:41:16 +1000 > > > >> Is there any way for the linker to pl

Re: linux-next: build failure after merge of most trees

2017-06-22 Thread Nicholas Piggin
On Thu, 22 Jun 2017 10:56:48 -0400 (EDT) David Miller wrote: > From: Nicholas Piggin > Date: Fri, 23 Jun 2017 00:33:39 +1000 > > > On Thu, 22 Jun 2017 10:13:06 -0400 (EDT) > > David Miller wrote: > > > >> From: Nicholas Piggin > >> Date: Thu,

Re: linux-next: build failure after merge of most trees

2017-06-22 Thread Nicholas Piggin
On Thu, 22 Jun 2017 23:43:10 +0930 Alan Modra wrote: > On Thu, Jun 22, 2017 at 06:41:16PM +1000, Nicholas Piggin wrote: > > Is there any way for the linker to place the inputs to avoid unresolvable > > relocations where possible? > > Not without quite a lot of work wri

Re: linux-next: build failure after merge of most trees

2017-06-22 Thread Nicholas Piggin
On Thu, 22 Jun 2017 10:13:06 -0400 (EDT) David Miller wrote: > From: Nicholas Piggin > Date: Thu, 22 Jun 2017 18:41:16 +1000 > > > Is there any way for the linker to place the inputs to avoid unresolvable > > relocations where possible? > > I don't think so.

Re: linux-next: build failure after merge of most trees

2017-06-22 Thread Nicholas Piggin
CC'ing Alan On Thu, 22 Jun 2017 15:24:41 +1000 Stephen Rothwell wrote: > Hi Dave, > > After merging almost all the trees, today's linux-next build (sparc64 > defconfig) failed like this: > > arch/sparc/lib/hweight.o: In function `__arch_hweight8': > (.text+0x0): relocation truncated to fit: R_

Re: linux-next: build failure after merge of most trees

2017-06-21 Thread Nicholas Piggin
On Thu, 22 Jun 2017 15:24:41 +1000 Stephen Rothwell wrote: > Hi Dave, > > After merging almost all the trees, today's linux-next build (sparc64 > defconfig) failed like this: > > arch/sparc/lib/hweight.o: In function `__arch_hweight8': > (.text+0x0): relocation truncated to fit: R_SPARC_WDISP19

Re: [BUG][next-20170619][347de24] PowerPC boot fails with Oops

2017-06-20 Thread Nicholas Piggin
On Tue, 20 Jun 2017 12:49:25 +0530 Abdul Haleem wrote: > Hi, > > commit: 347de24 (powerpc/64s: implement arch-specific hardlockup > watchdog) > > linux-next fails to boot on PowerPC Bare-metal box. > > Test: boot > Machine type: Power 8 Bare-metal > Kernel: 4.12.0-rc5-next-20170619 > gcc: vers

Re: [PATCH] kbuild: switch to thin archives

2017-06-19 Thread Nicholas Piggin
On Sun, 18 Jun 2017 12:04:26 +0200 Pavel Machek wrote: > On Fri 2017-06-02 22:54:54, Nicholas Piggin wrote: > > Switch from incremental build to thin archives for packaging built-in.o. > > binutils version must be bumped to 2.20. Proposed patch for 4.13. > > > > Sig

Re: [PATCH v4 3/5] watchdog: split up config options

2017-06-17 Thread Nicholas Piggin
On Fri, 16 Jun 2017 16:57:13 +1000 Nicholas Piggin wrote: > Split SOFTLOCKUP_DETECTOR from LOCKUP_DETECTOR, and split > HARDLOCKUP_DETECTOR_PERF from HARDLOCKUP_DETECTOR. > > LOCKUP_DETECTOR implies the general boot, sysctl, and programming > interfaces for the lockup det

Re: [PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs

2017-06-16 Thread Nicholas Piggin
On Fri, 16 Jun 2017 11:24:07 -0700 Andrew Morton wrote: > On Fri, 16 Jun 2017 16:57:14 +1000 Nicholas Piggin wrote: > > > After reconfiguring watchdog sysctls etc., architecture specific > > watchdogs may not get all their parameters updated. > > > > watchdog_re

Re: [PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog()

2017-06-16 Thread Nicholas Piggin
On Fri, 16 Jun 2017 11:21:17 -0700 Andrew Morton wrote: > On Fri, 16 Jun 2017 16:57:12 +1000 Nicholas Piggin wrote: > > > For architectures that define HAVE_NMI_WATCHDOG, instead of having > > them provide the complete touch_nmi_watchdog() function, just hav

[PATCH v4 5/5] powerpc/64s: implement arch-specific hardlockup watchdog

2017-06-15 Thread Nicholas Piggin
work, but the SMP watchdog will. Even on platforms without a true NMI IPI to get a good trace from the stuck CPU, other CPUs will notice the lockup sufficiently to report it and panic. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 7 +- arch/powerpc/include/asm/nmi.h

[PATCH v4 3/5] watchdog: split up config options

2017-06-15 Thread Nicholas Piggin
some of the interfaces, but not fully yet. It should probably be converted to a full HAVE_HARDLOCKUP_DETECTOR_ARCH. Signed-off-by: Nicholas Piggin --- arch/Kconfig | 23 arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/setup_64.c | 2 +- arch/x86/Kconfig

[PATCH v4 1/5] watchdog: remove unused declaration

2017-06-15 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- include/linux/nmi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/nmi.h b/include/linux/nmi.h index aa3cd0878270..5e2e57536d98 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -12,9 +12,6 @@ extern void

[PATCH v4 4/5] watchdog: provide watchdog_reconfigure() for arch watchdogs

2017-06-15 Thread Nicholas Piggin
After reconfiguring watchdog sysctls etc., architecture specific watchdogs may not get all their parameters updated. watchdog_reconfigure() can be implemented to pull the new values in and set the arch NMI watchdog. Signed-off-by: Nicholas Piggin --- kernel/watchdog.c | 29

[PATCH v4 2/5] watchdog: introduce arch_touch_nmi_watchdog()

2017-06-15 Thread Nicholas Piggin
ut on touching the softlockup watchdog or other generic details. Signed-off-by: Nicholas Piggin --- arch/blackfin/include/asm/nmi.h| 2 ++ arch/blackfin/kernel/nmi.c | 2 +- arch/mn10300/include/asm/nmi.h | 2 ++ arch/mn10300/kernel/mn10300-watchdog-low.S

[PATCH v4 0/5] Improve watchdog config for arch watchdogs

2017-06-15 Thread Nicholas Piggin
this. The powerpc watchdog is too much to carry anywhere but powerpc tree now, and watchdog patches seem to go via Andrew... Thanks, Nick Nicholas Piggin (5): watchdog: remove unused declaration watchdog: introduce arch_touch_nmi_watchdog() watchdog: split up config options watchdog: pr

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-15 Thread Nicholas Piggin
On Thu, 15 Jun 2017 11:51:22 -0400 Don Zickus wrote: > On Thu, Jun 15, 2017 at 01:04:01PM +1000, Nicholas Piggin wrote: > > > +#ifdef CONFIG_HARDLOCKUP_DETECTOR > > > /* boot commands */ > > > /* > > >* Should we panic when a soft-lockup or h

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-14 Thread Nicholas Piggin
On Wed, 14 Jun 2017 21:16:04 -0500 Babu Moger wrote: > Hi Don, > > On 6/14/2017 9:09 AM, Don Zickus wrote: > > On Wed, Jun 14, 2017 at 02:11:18AM +1000, Nicholas Piggin wrote: > >>> Yeah, if you wouldn't mind. Sorry for dragging this out, but I feel like >

[PATCH 2/3] cpuidle: powerpc: read mostly for common globals

2017-06-14 Thread Nicholas Piggin
Ensure these don't get put into bouncing cachelines. Reviewed-by: Vaidyanathan Srinivasan Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin --- drivers/cpuidle/cpuidle-powernv.c | 10 +- drivers/cpuidle/cpuidle-pseries.c | 8 2 files changed, 9 insertions(

[PATCH 3/3] cpuidle: powerpc: no memory barrier after break from idle

2017-06-14 Thread Nicholas Piggin
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. Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Nicholas Piggin --- drivers/cpuidle/cpuidle-powernv.c | 11

[PATCH 1/3] cpuidle: powerpc: cpuidle set polling before enabling irqs

2017-06-14 Thread Nicholas Piggin
possible. Reviewed-by: Gautham R. Shenoy Signed-off-by: Nicholas Piggin --- drivers/cpuidle/cpuidle-powernv.c | 4 +++- drivers/cpuidle/cpuidle-pseries.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle

[PATCH 0/3] powerpc (powernv and pseries) cpuidle driver improvmeents

2017-06-14 Thread Nicholas Piggin
Hi, These are a few small improvements that came from doing an optimisation pass over powerpc cpu idle paths. Michael reminded me to cc the cpuidle maintainers. I think he will take the patches through the powerpc tree, but any suggestion or ack or nack would be welcome. Thanks, Nick Nicholas

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-13 Thread Nicholas Piggin
On Mon, 12 Jun 2017 16:41:56 -0400 Don Zickus wrote: > On Mon, Jun 12, 2017 at 06:07:39PM +1000, Nicholas Piggin wrote: > > > > This would probably be the right direction to go in, but it will take > > > > slightly more I think. We first need to remove HAVE_NMI_WATCHDO

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-12 Thread Nicholas Piggin
On Thu, 8 Jun 2017 12:05:02 -0400 Don Zickus wrote: > On Wed, Jun 07, 2017 at 01:50:26PM +1000, Nicholas Piggin wrote: > > > > > > I _think_ having > > > > > > depends on LOCKUP_DETECTOR > > > depends on HAVE_NMI_WATCHDOG || HAVE_PERF_EVE

[PATCH v3] kbuild: provide THIN_ARCHIVES option for all architectures

2017-06-08 Thread Nicholas Piggin
Proposed patch for 4.13. Contains powerpc, x86/um, and sh build fixes. Signed-off-by: Nicholas Piggin --- Documentation/process/changes.rst | 9 - Makefile | 3 +++ arch/Kconfig | 6 -- arch/powerpc/Kconfig | 8

Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch

2017-06-08 Thread Nicholas Piggin
On Thu, 8 Jun 2017 14:45:40 +0200 Peter Zijlstra wrote: > On Thu, Jun 08, 2017 at 08:00:15PM +1000, Nicholas Piggin wrote: > > > I have those, I just also would like one in the core scheduler's use > > of smp_mb__after_spinlock(), because it would be easy for core sched

Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch

2017-06-08 Thread Nicholas Piggin
On Thu, 08 Jun 2017 19:54:30 +1000 Michael Ellerman wrote: > Peter Zijlstra writes: > > On Thu, Jun 08, 2017 at 05:29:38PM +1000, Nicholas Piggin wrote: > >> On Thu, 8 Jun 2017 08:54:00 +0200 > >> Peter Zijlstra wrote: > >> > &g

Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch

2017-06-08 Thread Nicholas Piggin
On Thu, 8 Jun 2017 09:57:20 +0200 Peter Zijlstra wrote: > On Thu, Jun 08, 2017 at 05:29:38PM +1000, Nicholas Piggin wrote: > > On Thu, 8 Jun 2017 08:54:00 +0200 > > Peter Zijlstra wrote: > > > > > On Thu, Jun 08, 2017 at 10:32:44AM +1000, Nicholas Piggin wrote:

Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch

2017-06-08 Thread Nicholas Piggin
On Thu, 8 Jun 2017 08:54:00 +0200 Peter Zijlstra wrote: > On Thu, Jun 08, 2017 at 10:32:44AM +1000, Nicholas Piggin wrote: > > On Wed, 07 Jun 2017 18:15:06 +0200 > > Peter Zijlstra wrote: > > > > > Now that the scheduler's rq->lock is RCsc and thus pr

Re: [RFC][PATCH 5/5] powerpc: Remove SYNC from _switch

2017-06-07 Thread Nicholas Piggin
On Wed, 07 Jun 2017 18:15:06 +0200 Peter Zijlstra wrote: > Now that the scheduler's rq->lock is RCsc and thus provides full > transitivity between scheduling actions. And since we cannot migrate > current, a task needs a switch-out and a switch-in in order to > migrate, in which case the RCsc pro

[PATCH v2] kbuild: switch to thin archives

2017-06-06 Thread Nicholas Piggin
Switch from incremental build to thin archives for packaging built-in.o. binutils version must be bumped to 2.20. Proposed patch for 4.13. Signed-off-by: Nicholas Piggin --- Documentation/process/changes.rst | 9 - Makefile | 3 +++ arch/Kconfig

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-06 Thread Nicholas Piggin
On Tue, 6 Jun 2017 12:49:58 -0400 Don Zickus wrote: > On Sat, Jun 03, 2017 at 04:10:05PM +1000, Nicholas Piggin wrote: > > > > config HARDLOCKUP_DETECTOR > > > > - def_bool y > > > > - depends on LOCKUP_DETECTOR && !HAVE_NMI_

Re: [PATCH] kbuild: switch to thin archives

2017-06-02 Thread Nicholas Piggin
] Thank you robot, can we try this one? Signed-off-by: Nicholas Piggin --- Documentation/process/changes.rst | 9 - Makefile | 3 +++ arch/Kconfig | 6 -- arch/powerpc/Kconfig | 8 arch/x86/um/vdso/Makefile

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-02 Thread Nicholas Piggin
On Fri, 2 Jun 2017 16:15:00 -0400 Don Zickus wrote: > On Tue, May 30, 2017 at 11:26:58AM +1000, Nicholas Piggin wrote: > > Split SOFTLOCKUP_DETECTOR from LOCKUP_DETECTOR, and split > > HARDLOCKUP_DETECTOR_PERF from HARDLOCKUP_DETECTOR. > > > > LOCKUP_DETECTOR pro

[PATCH] kbuild: switch to thin archives

2017-06-02 Thread Nicholas Piggin
Switch from incremental build to thin archives for packaging built-in.o. binutils version must be bumped to 2.20. Proposed patch for 4.13. Signed-off-by: Nicholas Piggin --- Documentation/process/changes.rst | 9 - Makefile | 3 +++ arch/Kconfig

Re: [PATCH 6/6] cpuidle-powernv: Allow Deep stop states that don't stop time

2017-05-30 Thread Nicholas Piggin
On Tue, 30 May 2017 16:20:55 +0530 Gautham R Shenoy wrote: > On Tue, May 30, 2017 at 05:13:57PM +1000, Nicholas Piggin wrote: > > On Tue, 16 May 2017 14:19:48 +0530 > > "Gautham R. Shenoy" wrote: > > > > > From: "Gautham R. Shenoy" &g

Re: [PATCH 6/6] cpuidle-powernv: Allow Deep stop states that don't stop time

2017-05-30 Thread Nicholas Piggin
On Tue, 16 May 2017 14:19:48 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > The current code in the cpuidle-powernv intialization only allows deep > stop states (indicated by OPAL_PM_STOP_INST_DEEP) which lose timebase > (indicated by OPAL_PM_TIMEBASE_STOP). This assumption go

Re: [PATCH 5/6] powernv:idle: Use Requested Level for restoring state on P9 DD1

2017-05-29 Thread Nicholas Piggin
; wakeup state will not restore the hypervisor resources. > > Hence, on DD1 systems, use the Requested Level (RL) field as a > workaround to restore the contents of the hypervisor resources on the > wakeup from the stop state. > > Signed-off-by: Gautham R. Shenoy Reviewed-by:

Re: [PATCH 3/6] powernv:idle: Restore LPCR on wakeup from deep-stop

2017-05-29 Thread Nicholas Piggin
ting the stop instruction. > > Signed-off-by: Gautham R. Shenoy Yes I think we need this. I have a plan to rework some of that cpu_restore and early CPU init stuff, but for now we need this. Does the OCC restore LPCR properly then we just trash it with ->cpu_restore(), or is i

Re: [PATCH 2/6] powernv:idle: Decouple Timebase restore & Per-core SPRs restore

2017-05-29 Thread Nicholas Piggin
ost, skip to clear_lock. >*/ > +.Ltb_resynced: > blt cr4,clear_lock > > /* It's more that timebase was not lost, rather than resynced. Can we just do a 'bgtl cr3,opal_resync_timebase'? I guess cr4 branch will never be true on POWER9... I think pnv_wakeup_tb_loss is going to end up clearer being split into two between isa 207 and 300. But that can wait until after POWER9 is working properly. Reviewed-by: Nicholas Piggin

Re: [PATCH 1/6] powernv:idle: Correctly initialize core_idle_state_ptr

2017-05-29 Thread Nicholas Piggin
ve. > > Fix this by correctly initializing the lower bits of the > core_idle_state_ptr on the basis of threads_per_core. > > Signed-off-by: Gautham R. Shenoy This looks good to me. Until this patch series, we can't enable HV state loss idle modes on POWER9, is that correct? And after your series does it work? Reviewed-by: Nicholas Piggin

[PATCH 3/4] watchdog: Split up config options

2017-05-29 Thread Nicholas Piggin
LOCKUP_DETECTOR interfaces. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/setup_64.c | 2 +- arch/x86/kernel/apic/hw_nmi.c | 2 +- include/linux/nmi.h| 31 -- kernel/Makefile| 2 +- kernel/sysctl.c| 18 ++-- kernel/watchdog.c

[PATCH 4/4] watchdog: Provide watchdog_reconfigure() for arch watchdogs

2017-05-29 Thread Nicholas Piggin
After reconfiguring watchdog sysctls etc., architecture specific watchdogs may not get all their parameters updated. watchdog_reconfigure() can be implemented to pull the new values in and set the arch NMI watchdog. Signed-off-by: Nicholas Piggin --- kernel/watchdog.c | 29

[PATCH 0/4][V3] Improve watchdog config for arch watchdogs

2017-05-29 Thread Nicholas Piggin
nt to improve things further. Nicholas Piggin (4): watchdog: remove unused declaration watchdog: Introduce arch_touch_nmi_watchdog() watchdog: Split up config options watchdog: Provide watchdog_reconfigure() for arch watchdogs arch/blackfin/include/asm/nmi.h| 2 + arch/blackfin/k

[PATCH 2/4] watchdog: Introduce arch_touch_nmi_watchdog()

2017-05-29 Thread Nicholas Piggin
ut on touching the softlockup watchdog or other generic details. Signed-off-by: Nicholas Piggin --- arch/blackfin/include/asm/nmi.h| 2 ++ arch/blackfin/kernel/nmi.c | 2 +- arch/mn10300/include/asm/nmi.h | 2 ++ arch/mn10300/kernel/mn10300-watchdog-low.S

[PATCH 1/4] watchdog: remove unused declaration

2017-05-29 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- include/linux/nmi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/nmi.h b/include/linux/nmi.h index aa3cd0878270..5e2e57536d98 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -12,9 +12,6 @@ extern void

[PATCH v2] spin loop primitives for busy waiting

2017-05-28 Thread Nicholas Piggin
_cpu_relax which defaults to cpu_relax. This will allow architectures to hook the entry and exit of busy-wait loops, and will allow powerpc to set low SMT priority at entry, and normal priority at exit. Suggested-by: Linus Torvalds Signed-off-by: Nicholas Piggin --- Since last time: - Fixed sp

Re: [PATCH 4/4] watchdog: provide watchdog_reconfigure() for arch watchdogs

2017-05-25 Thread Nicholas Piggin
On Thu, 25 May 2017 10:08:33 -0400 Don Zickus wrote: > On Thu, May 25, 2017 at 06:28:56PM +1000, Nicholas Piggin wrote: > > After reconfiguring watchdog sysctls etc., architecture specific > > watchdogs may not get all their parameters updated. > > > > watchdog_recon

Re: [PATCH 2/4] watchdog: introduce arch_touch_nmi_watchdog()

2017-05-25 Thread Nicholas Piggin
On Thu, 25 May 2017 09:55:59 -0400 Don Zickus wrote: > On Thu, May 25, 2017 at 06:28:54PM +1000, Nicholas Piggin wrote: > > For architectures that define HAVE_NMI_WATCHDOG, instead of having > > them provide the complete touch_nmi_watchdog() function, just have &

[PATCH 0/4][V2] Improve watchdog config for arch watchdogs

2017-05-25 Thread Nicholas Piggin
e same sysctls, some cmdline options are a bit different, etc. powerpc wants to move to its own detector like sparc, but without causing interface functionality to change. Thanks, Nick Nicholas Piggin (4): watchdog: remove unused declaration watchdog: introduce arch_touch_nmi_watchdog() watch

[PATCH 2/4] watchdog: introduce arch_touch_nmi_watchdog()

2017-05-25 Thread Nicholas Piggin
ut on touching the softlockup watchdog or other generic details. Signed-off-by: Nicholas Piggin --- arch/blackfin/include/asm/nmi.h| 2 ++ arch/blackfin/kernel/nmi.c | 2 +- arch/mn10300/include/asm/nmi.h | 2 ++ arch/mn10300/kernel/mn10300-watchdog-low.S

[PATCH 3/4] watchdog: split out config options

2017-05-25 Thread Nicholas Piggin
LOCKUP_DETECTOR interfaces. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/setup_64.c | 2 +- arch/x86/kernel/apic/hw_nmi.c | 2 +- include/linux/nmi.h| 35 -- kernel/Makefile| 2 +- kernel/sysctl.c| 18 ++-- kernel/watchdog.c

[PATCH 4/4] watchdog: provide watchdog_reconfigure() for arch watchdogs

2017-05-25 Thread Nicholas Piggin
After reconfiguring watchdog sysctls etc., architecture specific watchdogs may not get all their parameters updated. watchdog_reconfigure() can be implemented to pull the new values in and set the arch NMI watchdog. Signed-off-by: Nicholas Piggin --- kernel/watchdog.c | 28

[PATCH 1/4] watchdog: remove unused declaration

2017-05-25 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- include/linux/nmi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/nmi.h b/include/linux/nmi.h index aa3cd0878270..5e2e57536d98 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -12,9 +12,6 @@ extern void

[PATCH 2/5] watchdog: Introduce arch_touch_nmi_watchdog()

2017-05-22 Thread Nicholas Piggin
ut on touching the softlockup watchdog or other generic details. Signed-off-by: Nicholas Piggin --- arch/blackfin/include/asm/nmi.h| 2 ++ arch/blackfin/kernel/nmi.c | 2 +- arch/mn10300/include/asm/nmi.h | 2 ++ arch/mn10300/kernel/mn10300-watchdog-low.S

[PATCH 5/5] powerpc/64s: SMP hardlockup watchdog

2017-05-22 Thread Nicholas Piggin
CPUs with. Probably needs some small build fixes on other archs which do their own watchdogs like sparc, but it works on powerpc. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 3 +- arch/powerpc/include/asm/nmi.h | 8 + arch/powerpc/include/asm/smp.h | 2 + arch/powerpc

[PATCH 3/5] watchdog: Split up config options

2017-05-22 Thread Nicholas Piggin
LOCKUP_DETECTOR interfaces. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/setup_64.c | 2 +- arch/x86/kernel/apic/hw_nmi.c | 2 +- include/linux/nmi.h| 35 -- kernel/Makefile| 2 +- kernel/sysctl.c| 18 ++-- kernel/watchdog.c

[PATCH 4/5] watchdog: Provide watchdog_reconfigure() for arch watchdogs

2017-05-22 Thread Nicholas Piggin
After reconfiguring watchdog sysctls etc., architecture specific watchdogs may not get all their parameters updated. watchdog_reconfigure() can be implemented to pull the new values in and set the arch NMI watchdog. Signed-off-by: Nicholas Piggin --- kernel/watchdog.c | 28

[PATCH 1/5] watchdog: remove unused declaration

2017-05-22 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- include/linux/nmi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/nmi.h b/include/linux/nmi.h index aa3cd0878270..5e2e57536d98 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -12,9 +12,6 @@ extern void

[PATCH 0/5] Improve watchdog config for arch watchdogs

2017-05-22 Thread Nicholas Piggin
Hi Don, These first 4 patches are a further progression of my effort to make some of the hard lockup watchdog framework usable by arch code NMI watchdog. The last patch is a powerpc-specific implementation for reference to see how I'm using the changes. Thanks, Nick Nicholas Pigg

Re: [PATCH] initramfs: Fix disabling of initramfs (and its compression)

2017-05-21 Thread Nicholas Piggin
tramfs within > the same kernel .config file, and be in control of what > CONFIG_INITRAMFS_COMPRESSION is set to. > > Fixes: db2aa7fd15e8 ("initramfs: allow again choice of the embedded initram > compression algorithm") > Fixes: 9e3596b0c653 ("kbuild: initram

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-19 Thread Nicholas Piggin
On Fri, 19 May 2017 15:43:45 -0400 Don Zickus wrote: > On Sat, May 20, 2017 at 12:53:06AM +1000, Nicholas Piggin wrote: > > > I am curious to know what IBM thinks there. Currently the HARDLOCKUP > > > detector sits on top of perf. I get the impression, you are removing

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-19 Thread Nicholas Piggin
On Fri, 19 May 2017 09:17:53 -0400 Don Zickus wrote: > On Fri, May 19, 2017 at 09:07:31AM +1000, Nicholas Piggin wrote: > > On Thu, 18 May 2017 12:30:28 -0400 > > Don Zickus wrote: > > > > > (adding Uli) > > > > > > On Fri, May 19,

Re: [RFC] arch hardlockup detector interfaces improvement

2017-05-18 Thread Nicholas Piggin
On Thu, 18 May 2017 12:30:28 -0400 Don Zickus wrote: > (adding Uli) > > On Fri, May 19, 2017 at 01:50:26AM +1000, Nicholas Piggin wrote: > > I'd like to make it easier for architectures that have their own NMI / > > hard lockup detector to reuse various configu

[RFC] arch hardlockup detector interfaces improvement

2017-05-18 Thread Nicholas Piggin
I'd like to make it easier for architectures that have their own NMI / hard lockup detector to reuse various configuration interfaces that are provided by generic detectors (cmdline, sysctl, suspend/resume calls). I'd also like to remove the dependency of arch hard lockup detectors on the softlock

Re: [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1

2017-05-12 Thread Nicholas Piggin
n paca after > recovering the paca on POWER9 DD1. > > Fixes: commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup > from a stop on P9 DD1") > > Signed-off-by: Gautham R. Shenoy This looks obviously correct to me. Reviewed-by: Nicholas Piggin > --

Re: [linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Nicholas Piggin
On Fri, 05 May 2017 09:40:10 +0530 Abdul Haleem wrote: > On Thu, 2017-05-04 at 20:41 +1000, Nicholas Piggin wrote: > > On Thu, 04 May 2017 14:54:19 +0530 > > Abdul Haleem wrote: > > > > > Hi, > > > > > > linux-next build fails on BE config w

Re: [linux-next][bisected 1945bc45] build brakes for PowerPC BE configuration on LPAR

2017-05-04 Thread Nicholas Piggin
ted with the below bad commit. > > commit 1945bc4549e5cb1f9aa873ec29191aa54dc851d > Author: Nicholas Piggin > Date: Wed Apr 19 23:05:47 2017 +1000 > > powerpc/64s: Fix POWER9 machine check handler from stop state > > Reviewed-by: Gautham R. Shenoy > Reviewed-by: Mahesh J Salgaonka

Re: [PATCH v2] powerpc/mm: Only read faulting instruction when necessary in do_page_fault()

2017-04-30 Thread Nicholas Piggin
On Fri, 28 Apr 2017 08:13:01 +0200 (CEST) Christophe Leroy wrote: > Commit a7a9dcd882a67 ("powerpc: Avoid taking a data miss on every > userspace instruction miss") has shown that limiting the read of > faulting instruction to likely cases improves performance. > > This patch goes further into t

Re: [PATCH 3/3] powernv:idle: Set LPCR_UPRT on wakeup from deep-stop

2017-04-13 Thread Nicholas Piggin
On Thu, 13 Apr 2017 17:24:34 +0530 Gautham R Shenoy wrote: > On Thu, Apr 13, 2017 at 05:18:17PM +1000, Nicholas Piggin wrote: > > On Thu, 13 Apr 2017 16:27:34 +1000 > > Michael Neuling wrote: > > > > > On Thu, 2017-04-13 at 14:12 +1000, Benjamin Herrenschmidt wr

Re: [PATCH 3/3] powernv:idle: Set LPCR_UPRT on wakeup from deep-stop

2017-04-13 Thread Nicholas Piggin
On Thu, 13 Apr 2017 16:27:34 +1000 Michael Neuling wrote: > On Thu, 2017-04-13 at 14:12 +1000, Benjamin Herrenschmidt wrote: > > On Thu, 2017-04-13 at 09:28 +0530, Aneesh Kumar K.V wrote: > > > >   #endif > > > >    mtctr   r12 > > > >    bctrl > > > > +/* > > > > + * cur_cpu_spec->cpu_

Re: [RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-07 Thread Nicholas Piggin
On Fri, 7 Apr 2017 11:43:49 +0200 Peter Zijlstra wrote: > On Thu, Apr 06, 2017 at 10:31:46AM -0700, Linus Torvalds wrote: > > But maybe "monitor" is really cheap. I suspect it's microcoded, > > though, which implies "no". > > On my IVB-EP (will also try on something newer): > > MONITOR

Re: [RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-06 Thread Nicholas Piggin
On Thu, 6 Apr 2017 12:41:52 -0700 Linus Torvalds wrote: > On Thu, Apr 6, 2017 at 12:23 PM, Peter Zijlstra wrote: > > > > Something like so then. According to the SDM mwait is a no-op if we do > > not execute monitor first. So this variant should get the first > > iteration without expensive inst

Re: [RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-06 Thread Nicholas Piggin
On Thu, 6 Apr 2017 15:13:53 +0100 Will Deacon wrote: > Hi Nick, > > On Thu, Apr 06, 2017 at 10:59:58AM +1000, Nicholas Piggin wrote: > > On Wed, 05 Apr 2017 07:01:57 -0700 (PDT) > > David Miller wrote: > > > > > From: Nicholas Piggin > &

Re: [RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-05 Thread Nicholas Piggin
On Wed, 05 Apr 2017 07:01:57 -0700 (PDT) David Miller wrote: > From: Nicholas Piggin > Date: Tue, 4 Apr 2017 13:02:33 +1000 > > > On Mon, 3 Apr 2017 17:43:05 -0700 > > Linus Torvalds wrote: > > > >> But that depends on architectures having some patter

Re: [RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-03 Thread Nicholas Piggin
On Tue, 4 Apr 2017 13:02:33 +1000 Nicholas Piggin wrote: > On Mon, 3 Apr 2017 17:43:05 -0700 > Linus Torvalds wrote: > > > But that depends on architectures having some pattern that we *can* > > abstract. Would some "begin/in-loop/end" pattern like the abov

Re: [RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-03 Thread Nicholas Piggin
On Mon, 3 Apr 2017 17:43:05 -0700 Linus Torvalds wrote: > On Mon, Apr 3, 2017 at 4:50 PM, Nicholas Piggin wrote: > > If you have any ideas, I'd be open to them. > > So the idea would be that maybe we can just make those things > explicit. IOW, instead of havi

Re: [RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-03 Thread Nicholas Piggin
On Mon, 3 Apr 2017 08:31:30 -0700 Linus Torvalds wrote: > On Mon, Apr 3, 2017 at 1:13 AM, Nicholas Piggin wrote: > > > > The loops have some restrictions on what can be used, but they are > > intended to be small and simple so it's not generally a problem:

[RFC][PATCH] spin loop arch primitives for busy waiting

2017-04-03 Thread Nicholas Piggin
Hi, I would like to revisit this again and see if people are opposed to this arch primitive. We have attributed cases of suboptimal performance on real customer workloads to this, so I'd like to find a solution. Since last posting, I promised the s390 people I'd consider hypervisor yield addition

Re: [v3 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-22 Thread Nicholas Piggin
on the > way out by setting the NAPSTATELOST in paca. > > [Changelog written with inputs from sva...@linux.vnet.ibm.com] Looks good. Reviewed-by: Nicholas Piggin

Re: [v2 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-22 Thread Nicholas Piggin
On Wed, 22 Mar 2017 11:28:46 +0530 Gautham R Shenoy wrote: > On Tue, Mar 21, 2017 at 02:59:46AM +1000, Nicholas Piggin wrote: > > On Mon, 20 Mar 2017 21:24:18 +0530 > > "Gautham R. Shenoy" wrote: > > > > > From: "Gautham R. Shenoy" >

Re: [v2 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-21 Thread Nicholas Piggin
On Tue, 21 Mar 2017 02:59:46 +1000 Nicholas Piggin wrote: > On Mon, 20 Mar 2017 21:24:18 +0530 > This is quite neat now you've moved it to its own function. Nice. > It will be only a trivial clash with my patches now, I think. > > Reviewed-by: Nicholas Piggin Hmm... This

Re: [v2 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-20 Thread Nicholas Piggin
n up with > * hypervisor state loss. If yes, restore hypervisor state and return > @@ -385,7 +425,14 @@ _GLOBAL(power9_idle_stop) > */ > _GLOBAL(pnv_restore_hyp_resource) > BEGIN_FTR_SECTION > - ld r2,PACATOC(r13); > +BEGIN_FTR_SECTION_NESTED(70) > + mflrr6 > + bl power9_dd1_recover_paca > + mtlrr6 > + ld r2, PACATOC(r13) > +FTR_SECTION_ELSE_NESTED(70) > + ld r2, PACATOC(r13) > +ALT_FTR_SECTION_END_NESTED_IFSET(CPU_FTR_POWER9_DD1, 70) This is quite neat now you've moved it to its own function. Nice. It will be only a trivial clash with my patches now, I think. Reviewed-by: Nicholas Piggin

Re: [v2 PATCH 3/4] powernv:idle: Don't override default/deepest directly in kernel

2017-03-20 Thread Nicholas Piggin
t; +static u64 pnv_deepest_stop_psscr_val; > +static u64 pnv_deepest_stop_psscr_mask; > +static bool deepest_stop_found; Aha you have made them static. Nitpick withdrawn :) The log messages look good now. Reviewed-by: Nicholas Piggin

Re: [v2 PATCH 1/4] powernv: Move CPU-Offline idle state invocation from smp.c to idle.c

2017-03-20 Thread Nicholas Piggin
.c could become static (pnv_deepest_stop_psscr_*). Reviewed-by: Nicholas Piggin

Re: [PATCH 3/3] powernv:Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-14 Thread Nicholas Piggin
On Mon, 13 Mar 2017 11:31:28 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > POWER9 platform can be configured to rebalance per-thread resources > within a core in order to improve SMT performance. Certain STOP > states can be configure to relinquish resources include some > h

Re: [PATCH 2/3] powernv:idle: Don't override default/deepest directly in kernel

2017-03-14 Thread Nicholas Piggin
On Mon, 13 Mar 2017 11:31:27 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > Currently during idle-init on power9, if we don't find suitable stop > states in the device tree that can be used as the > default_stop/deepest_stop, we set stop0 (ESL=1,EC=1) as the default > stop sta

Re: [PATCH 1/3] powernv:smp: Add busy-wait loop as fall back for CPU-Hotplug

2017-03-14 Thread Nicholas Piggin
On Mon, 13 Mar 2017 11:31:26 +0530 "Gautham R. Shenoy" wrote: > [Changelog written with inputs from sva...@linux.vnet.ibm.com] > Signed-off-by: Gautham R. Shenoy Reviewed-by: Nicholas Piggin > --- > arch/powerpc/platforms/powernv/smp.c | 10 +- > 1 file ch

Re: [PATCH] mm: fix KPF_SWAPCACHE

2017-02-08 Thread Nicholas Piggin
instead > of being shown on unrelated pages which have PG_owner_priv_1 set. > > Signed-off-by: Hugh Dickins Thanks Hugh, this seems fine to me. We want this for 4.10, no? Fixes: 6326fec1122c ("mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked") Reviewed-by: N

Re: [PATCH 2/2] mm: add PageWaiters indicating tasks are waiting for a page bit

2017-01-03 Thread Nicholas Piggin
On Tue, 3 Jan 2017 10:24:39 + Mel Gorman wrote: > On Thu, Dec 29, 2016 at 03:26:15PM +1000, Nicholas Piggin wrote: > > > And I fixed that too. > > > > > > Of course, I didn't test the changes (apart from building it). But > > > I've been run

Re: [PATCH 2/2] mm: add PageWaiters indicating tasks are waiting for a page bit

2016-12-28 Thread Nicholas Piggin
On Wed, 28 Dec 2016 20:16:56 -0800 Linus Torvalds wrote: > On Wed, Dec 28, 2016 at 8:08 PM, Nicholas Piggin wrote: > > > > Okay. The name could be a bit better though I think, for readability. > > Just a BUILD_BUG_ON if it is not constant and correct bit numbers? > &g

Re: [PATCH 2/2] mm: add PageWaiters indicating tasks are waiting for a page bit

2016-12-28 Thread Nicholas Piggin
On Wed, 28 Dec 2016 11:17:00 -0800 Linus Torvalds wrote: > On Tue, Dec 27, 2016 at 7:53 PM, Nicholas Piggin wrote: > >> > >> Yeah, that patch is disgusting, and doesn't even help x86. > > > > No, although it would help some cases (but granted the bit

<    4   5   6   7   8   9   10   11   >