Re: [PATCH] powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-08-31 Thread Nicholas Piggin
On Thu, 31 Aug 2017 17:17:41 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via > stop-api only on Hotplug") clears the PECE1 bit of the LPCR via > stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on

Re: [PATCH resend] timers: Fix excessive granularity of new timers after a nohz idle

2017-08-22 Thread Nicholas Piggin
On Tue, 22 Aug 2017 09:45:46 +0200 (CEST) Thomas Gleixner wrote: > On Tue, 22 Aug 2017, Nicholas Piggin wrote: > > I would have preferred to get comments from the timer maintainers, but > > they've been busy or away for the past copule of weeks. Perhaps you > > would

[PATCH v2] timers: Fix excessive granularity of new timers after a nohz idle

2017-08-22 Thread Nicholas Piggin
4 0.11 Tested-by: Jonathan Cameron Tested-by: David Miller Signed-off-by: Nicholas Piggin --- - Address Thomas' comments (hopefully). - Reword the changelog a bit. - Added Jonathan's tested-by kernel/time/timer.c | 50 +- 1 file ch

Re: undefined reference to `_GLOBAL_OFFSET_TABLE_'

2017-08-22 Thread Nicholas Piggin
On Tue, 22 Aug 2017 11:19:02 +0200 Michal Simek wrote: > On 20.8.2017 05:36, Nicholas Piggin wrote: > > On Sun, 20 Aug 2017 08:37:36 +0800 > > kbuild test robot wrote: > > > >> Hi Nicholas, > >> > >> FYI, the error/warning still remains. >

Re: [PATCH 2/2 v2] sched/wait: Introduce lock breaker in wake_up_page_bit

2017-08-27 Thread Nicholas Piggin
On Sun, 27 Aug 2017 16:12:19 -0700 Linus Torvalds wrote: > On Sun, Aug 27, 2017 at 2:40 PM, Linus Torvalds > wrote: > > > > The race goes like this: > > > > thread1 thread2 thread3 > > > > > > .. CPU1 ... > > __lock_page_killable > > w

Re: [PATCH 2/2 v2] sched/wait: Introduce lock breaker in wake_up_page_bit

2017-08-27 Thread Nicholas Piggin
On Mon, 28 Aug 2017 11:16:48 +1000 Nicholas Piggin wrote: > On Sun, 27 Aug 2017 16:12:19 -0700 > Linus Torvalds wrote: > > > diff --git a/mm/filemap.c b/mm/filemap.c > > index baba290c276b..0b41c8cbeabc 100644 > > --- a/mm/filemap.c > > +++

Re: [PATCH 2/2 v2] sched/wait: Introduce lock breaker in wake_up_page_bit

2017-08-28 Thread Nicholas Piggin
On Sun, 27 Aug 2017 22:17:55 -0700 Linus Torvalds wrote: > On Sun, Aug 27, 2017 at 6:29 PM, Nicholas Piggin wrote: > > > > BTW. since you are looking at this stuff, one other small problem I remember > > with exclusive waiters is that losing to a concurrent locker puts th

Re: [PATCH 0/2] start using spin primitives in sched and locking

2017-08-31 Thread Nicholas Piggin
Hi guys, Any thoughts on these? Thanks, Nick On Sun, 20 Aug 2017 19:25:00 +1000 Nicholas Piggin wrote: > Nicholas Piggin (2): > locking: Use spin primitives for busy loops > sched/idle: Use spin loop primitives for polling idle > > include/linux/bit_spinloc

[PATCH] cpuidle: fix broadcast control when broadcast can not be entered

2017-08-31 Thread Nicholas Piggin
(!irqs_disabled()) to trigger in some cases. It does not appear to cause problems for code today, but seems to violate the interface so should be fixed. Signed-off-by: Nicholas Piggin --- drivers/cpuidle/cpuidle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpuidle/cpuidle.c b/drivers

Re: [patch 00/29] lockup_detector: Cure hotplug deadlocks and replace duct tape

2017-08-31 Thread Nicholas Piggin
On Thu, 31 Aug 2017 18:10:14 -0400 Don Zickus wrote: > On Thu, Aug 31, 2017 at 09:15:58AM +0200, Thomas Gleixner wrote: > > The lockup detector is broken is several ways: > > > > - It's deadlock prone vs. CPU hotplug in various ways. Some of these > > are due to recursive cpus_read_loc

[PATCH] swait: add missing barrier to swake_up

2017-08-31 Thread Nicholas Piggin
prescribed by the waitqueue_active comments. Signed-off-by: Nicholas Piggin -- I noticed this when chasing down that rcu hang bug (which turned out to not be anything of the sort). I might be missing something here and it's safe somehow, but if so then it should have a comment where it diverges

Re: [PATCH] swait: add missing barrier to swake_up

2017-09-01 Thread Nicholas Piggin
On Fri, 1 Sep 2017 11:23:22 +0200 Andrea Parri wrote: > On Fri, Sep 01, 2017 at 04:14:50PM +1000, Nicholas Piggin wrote: > > swake_up and swake_up_all test the swaitqueue outside the lock, > > but they are missing the barrier that would ensure visibility > > of a previou

Re: [PATCH] powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-09-01 Thread Nicholas Piggin
On Fri, 1 Sep 2017 15:38:59 +0530 Akshay Adiga wrote: > On 08/31/2017 05:37 PM, Nicholas Piggin wrote: > > On Thu, 31 Aug 2017 17:17:41 +0530 > > "Gautham R. Shenoy" wrote: > > > > > From: "Gautham R. Shenoy" > > > > >

Re: [PATCH 1/2] locking: Use spin primitives for busy loops

2017-09-05 Thread Nicholas Piggin
Sure, will do. > > On Sun, Aug 20, 2017 at 07:25:01PM +1000, Nicholas Piggin wrote: > > > @@ -108,12 +109,10 @@ static inline unsigned __read_seqcount_begin(const > > seqcount_t *s) > > { > > unsigned ret; > > > > -repeat: > >

Re: [PATCH 2/2] sched/idle: Use spin loop primitives for polling idle

2017-09-05 Thread Nicholas Piggin
On Fri, 1 Sep 2017 14:24:54 +0200 Peter Zijlstra wrote: > On Sun, Aug 20, 2017 at 07:25:02PM +1000, Nicholas Piggin wrote: > > Signed-off-by: Nicholas Piggin > > --- > > kernel/sched/idle.c | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > &g

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

2017-09-07 Thread Nicholas Piggin
On Thu, 7 Sep 2017 05:50:30 -0700 Florian Fainelli wrote: > On 08/28/2017 08:09 PM, Nicholas Piggin wrote: > > On Mon, 28 Aug 2017 13:03:31 -0700 > > Florian Fainelli wrote: > > > >> On 05/21/2017 07:46 PM, Nicholas Piggin wrote: > >>> On Sat

Re: undefined reference to `_GLOBAL_OFFSET_TABLE_'

2017-08-19 Thread Nicholas Piggin
On Sun, 20 Aug 2017 08:37:36 +0800 kbuild test robot wrote: > Hi Nicholas, > > FYI, the error/warning still remains. Still same answer as before, i.e., it seems to be this toolchain bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21017 I've had no response from the microblaze maintainer,

[PATCH 0/2] start using spin primitives in sched and locking

2017-08-20 Thread Nicholas Piggin
Nicholas Piggin (2): locking: Use spin primitives for busy loops sched/idle: Use spin loop primitives for polling idle include/linux/bit_spinlock.h| 5 ++--- include/linux/seqlock.h | 9 - kernel/locking/mcs_spinlock.h | 6 ++ kernel/locking/mutex.c

[PATCH 1/2] locking: Use spin primitives for busy loops

2017-08-20 Thread Nicholas Piggin
Commit fd851a3cdc ("spin loop primitives for busy waiting") introduced a begin/relax/end sequence for busy loops, to improve behaviour with some architectures. Convert most of the generic locking primitives over to use these spin primitives. Signed-off-by: Nicholas Piggin --- inc

[PATCH 2/2] sched/idle: Use spin loop primitives for polling idle

2017-08-20 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- kernel/sched/idle.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 6c23e30c0e5c..b884980da8ef 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -11,6 +11,7 @@ #include

[no subject]

2017-08-21 Thread Nicholas Piggin
PU can go idle for longer than 4 seconds, which limits the granularity errors. Sub-optimal timer behaviour is observable on a smaller scale: max avg std upstream 9.01.05 0.19 patched 2.01.04 0.11 Tested-by: David Miller Signed-off-by: Nicholas Piggin

[PATCH resend] timers: Fix excessive granularity of new timers after a nohz idle

2017-08-21 Thread Nicholas Piggin
on a smaller scale: max avg std upstream 9.01.05 0.19 patched 2.01.04 0.11 Tested-by: David Miller Signed-off-by: Nicholas Piggin --- Hi Andrew, I would have preferred to get comments from the timer maintainers, but they've been busy or away

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

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

[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

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

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_

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

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

[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

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

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 tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-04 Thread Nicholas Piggin
eld access in > membarrier_private_expedited. Matches WRITE_ONCE() performed in > process registration. > > Changes since v4: > - Move powerpc hook from sched_in() to switch_mm(), based on feedback > from Nicholas Piggin. For now, the powerpc approach is okay by me. I plan to t

Re: [patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage

2017-10-03 Thread Nicholas Piggin
On Tue, 3 Oct 2017 09:04:03 +0200 (CEST) Thomas Gleixner wrote: > On Tue, 3 Oct 2017, Thomas Gleixner wrote: > > On Tue, 3 Oct 2017, Michael Ellerman wrote: > > > Hi Thomas, > > > Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc > > > because we're calling it multiple time

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-27 Thread Nicholas Piggin
On Tue, 26 Sep 2017 20:43:28 + (UTC) Mathieu Desnoyers wrote: > - On Sep 26, 2017, at 1:51 PM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > > > Provide a new command allowing processes to register their intent to use > > the private expedited command. > > > > I missed

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 13:31:36 + (UTC) Mathieu Desnoyers wrote: > - On Sep 27, 2017, at 9:04 AM, Nicholas Piggin npig...@gmail.com wrote: > > > On Tue, 26 Sep 2017 20:43:28 + (UTC) > > Mathieu Desnoyers wrote: > > > >> - On Sep 26, 20

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 15:29:50 + (UTC) Mathieu Desnoyers wrote: > - On Sep 28, 2017, at 11:01 AM, Nicholas Piggin npig...@gmail.com wrote: > > > On Thu, 28 Sep 2017 13:31:36 + (UTC) > > Mathieu Desnoyers wrote: > > > >> ----- On Sep 27, 2017,

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-28 Thread Nicholas Piggin
On Thu, 28 Sep 2017 17:51:15 +0200 Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 01:01:12AM +1000, Nicholas Piggin wrote: > > That's fine. If a user is not bound to a subset of CPUs, they could > > also cause disturbances with other syscalls and faults, taking locks, >

Re: [PATCH v4 for 4.14 1/3] membarrier: Provide register expedited private command

2017-09-29 Thread Nicholas Piggin
On Fri, 29 Sep 2017 12:31:31 +0200 Peter Zijlstra wrote: > On Fri, Sep 29, 2017 at 02:27:57AM +1000, Nicholas Piggin wrote: > > > The biggest power boxes are more tightly coupled than those big > > SGI systems, but even so just plodding along taking and releasing > > loc

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

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-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, 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 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

[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

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

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 -v2 3/4] locking: Introduce smp_mb__after_spinlock().

2017-08-03 Thread Nicholas Piggin
er _inside_ the spin_lock(). In that case we upgrade > > the RCpc spinlock to an RCsc. That would make all schedule() calls > > fully transitive against one another. > > > > Cc: Alan Stern > > Cc: Nicholas Piggin > > Cc: Ingo Molnar > > Cc: Will

Re: [RFC PATCH v2] membarrier: expedited private command

2017-07-28 Thread Nicholas Piggin
On Fri, 28 Jul 2017 17:06:53 + (UTC) Mathieu Desnoyers wrote: > - On Jul 28, 2017, at 12:46 PM, Peter Zijlstra pet...@infradead.org wrote: > > > On Fri, Jul 28, 2017 at 03:38:15PM +, Mathieu Desnoyers wrote: > >> > Which only leaves PPC stranded.. but the 'good' news is that mpe sa

Re: [RFC PATCH v2] membarrier: expedited private command

2017-07-29 Thread Nicholas Piggin
On Sat, 29 Jul 2017 11:23:33 +0200 Peter Zijlstra wrote: > On Sat, Jul 29, 2017 at 11:58:40AM +1000, Nicholas Piggin wrote: > > I haven't had time to read the thread and understand exactly why you need > > this extra barrier, I'll do it next week. Thanks for cc'

Re: [RFC PATCH v2] membarrier: expedited private command

2017-07-29 Thread Nicholas Piggin
On Sat, 29 Jul 2017 19:45:43 +1000 Nicholas Piggin wrote: > hmm, we might be able to restrict iteration > to mm_cpumask(current->mm), no? Oh that's been discussed too. I'll read back over it too.

Re: [RFC PATCH v2] membarrier: expedited private command

2017-07-31 Thread Nicholas Piggin
On Mon, 31 Jul 2017 23:20:59 +1000 Michael Ellerman wrote: > Peter Zijlstra writes: > > > On Fri, Jul 28, 2017 at 10:55:32AM +0200, Peter Zijlstra wrote: > >> diff --git a/kernel/sched/core.c b/kernel/sched/core.c > >> index e9785f7aed75..33f34a201255 100644 > >> --- a/kernel/sched/core.c > >

Re: [RFC PATCH v2] membarrier: expedited private command

2017-07-31 Thread Nicholas Piggin
On Tue, 1 Aug 2017 01:33:09 + (UTC) Mathieu Desnoyers wrote: > - On Jul 31, 2017, at 8:35 PM, Nicholas Piggin npig...@gmail.com wrote: > > > On Mon, 31 Jul 2017 23:20:59 +1000 > > Michael Ellerman wrote: > > > >> Peter Zijlstra writes: > >&g

Re: [v4 PATCH 0/2] powerpc/powernv: Enable stop4 via cpuidle

2017-08-07 Thread Nicholas Piggin
the SPR saving is moving in the right direction too. We should get this enabled stream as soon as possible. For both patches, Reviewed-by: Nicholas Piggin

Re: [PATCH v6 01/17] powerpc/vas: Define macros, register fields and structures

2017-08-13 Thread Nicholas Piggin
On Mon, 14 Aug 2017 15:21:48 +1000 Michael Ellerman wrote: > Sukadev Bhattiprolu writes: > > arch/powerpc/include/asm/vas.h | 35 > > arch/powerpc/include/uapi/asm/vas.h | 25 +++ > > I thought we weren't exposing VAS to userspace yet? > > If we are then we need to get things

Re: [RFC PATCH v2] membarrier: expedited private command

2017-08-01 Thread Nicholas Piggin
On Tue, 1 Aug 2017 10:12:30 +0200 Peter Zijlstra wrote: > On Tue, Aug 01, 2017 at 12:00:47PM +1000, Nicholas Piggin wrote: > > Thanks for this, I'll take a look. This should be a good start as a stress > > test, but I'd also be interested in some application. The

Re: [RFC PATCH v2] membarrier: expedited private command

2017-08-01 Thread Nicholas Piggin
On Tue, 1 Aug 2017 12:22:03 +0200 Peter Zijlstra wrote: > On Tue, Aug 01, 2017 at 07:57:17PM +1000, Nicholas Piggin wrote: > > On Tue, 1 Aug 2017 10:12:30 +0200 > > Peter Zijlstra wrote: > > > > > On Tue, Aug 01, 2017 at 12:00:47PM +1000, Nicholas Piggin wr

Re: [RFC PATCH v2] membarrier: expedited private command

2017-08-01 Thread Nicholas Piggin
On Tue, 1 Aug 2017 13:00:23 +0200 Peter Zijlstra wrote: > On Tue, Aug 01, 2017 at 08:39:28PM +1000, Nicholas Piggin wrote: > > Right, I just don't see what real problem this opens up that you don't > > already have when you are not hard partitioned, therefore it doesn&

Re: [RFC PATCH v2] membarrier: expedited private command

2017-08-01 Thread Nicholas Piggin
On Tue, 1 Aug 2017 16:32:03 -0700 "Paul E. McKenney" wrote: > On Tue, Aug 01, 2017 at 04:16:54PM +0200, Peter Zijlstra wrote: > > On Tue, Aug 01, 2017 at 06:23:09AM -0700, Paul E. McKenney wrote: > > > On Tue, Aug 01, 2017 at 12:22:03PM +0200, Peter Zijlstra wrote: > > > > > > [ . . . ] > > >

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 >

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

[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

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

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

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 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] 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: [v3 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle

2017-07-26 Thread Nicholas Piggin
. Shenoy Looks good to me. Keeping in mind we need to tidy up and unify all this SPR handling and save/restore etc. in the longer term. Reviewed-by: Nicholas Piggin > --- > v2-->v3: > - Use a structure instead of an array for the stop sprs save area. > - Name the offsets into the paca

Re: [RESEND] [v3 PATCH 2/2] powernv/powerpc: Clear PECE1 in LPCR via stop-api only on Hotplug

2017-07-26 Thread Nicholas Piggin
ck once the CPU is online. Looks pretty good to me, thanks! Reviewed-by: Nicholas Piggin > > Signed-off-by: Gautham R. Shenoy > --- > v2 --> v3: > - Program the LPCR during platform idle entry/exit on both POWER8 and > POWER9 > > v1 --> v2: >

Re: [PATCH 5/7] arm64: keep .altinstructions and .altinstr_replacement

2017-11-30 Thread Nicholas Piggin
On Thu, 30 Nov 2017 09:00:35 -0800 Nick Desaulniers wrote: > On Wed, Nov 29, 2017 at 5:58 PM, Nicholas Piggin wrote: > > (Comparing `readelf -S` before/after is a way to spot bugs.) > > Do you have a script that can be used to diff 2 `readelf -S`, look for > missing referen

Re: POWER: Unexpected fault when writing to brk-allocated memory

2017-11-09 Thread Nicholas Piggin
On Tue, 7 Nov 2017 17:01:58 +0300 "Kirill A. Shutemov" wrote: > On Tue, Nov 07, 2017 at 07:15:58PM +0530, Aneesh Kumar K.V wrote: > > > > > > > > If it is decided to keep these kind of heuristics, can we get just a > > > small but reasonably precise description of each change to the > > > int

Re: POWER: Unexpected fault when writing to brk-allocated memory

2017-11-09 Thread Nicholas Piggin
On Thu, 9 Nov 2017 11:44:21 -0800 Matthew Wilcox wrote: > On Fri, Nov 10, 2017 at 04:15:26AM +1100, Nicholas Piggin wrote: > > So these semantics are what we're going with? Anything that does mmap() is > > guaranteed of getting a 47-bit pointer and it can use the top 17 bit

Re: [v2,12/18] kbuild: add support for clang LTO

2017-11-17 Thread Nicholas Piggin
On Wed, 15 Nov 2017 13:34:22 -0800 Sami Tolvanen wrote: > This change adds the configuration option CONFIG_LTO_CLANG, and > build system support for clang's Link Time Optimization (LTO). In > preparation for LTO support for other compilers, potentially common > parts of the changes are gated behi

Re: [v2,12/18] kbuild: add support for clang LTO

2017-11-20 Thread Nicholas Piggin
On Mon, 20 Nov 2017 12:21:52 -0800 Sami Tolvanen wrote: > On Sat, Nov 18, 2017 at 01:21:39PM +1000, Nicholas Piggin wrote: > > Do you have any kind of numbers for this, out of curiosity? Binary > > size, performance, build time? > > I don't have performance numbe

Re: [PATCH 5/7] arm64: keep .altinstructions and .altinstr_replacement

2017-11-29 Thread Nicholas Piggin
On Wed, 29 Nov 2017 15:57:53 -0800 Nick Desaulniers wrote: > On Wed, Nov 29, 2017 at 3:44 PM, Sami Tolvanen > wrote: > > Make sure the linker doesn't remove .altinstructions or > > .altinstr_replacement when CONFIG_LD_DEAD_CODE_DATA_ELIMINATION is > > enabled. > > This sounds like a bug in t

Re: [PATCH 3/7] kbuild: fix LD_DEAD_CODE_DATA_ELIMINATION with GNU gold

2017-11-29 Thread Nicholas Piggin
my other comments. Reviewed-by: Nicholas Piggin

Re: [RFC PATCH for 4.15 10/14] cpu_opv: Wire up powerpc system call

2017-11-06 Thread Nicholas Piggin
On Mon, 6 Nov 2017 15:56:40 -0500 Mathieu Desnoyers wrote: > diff --git a/arch/powerpc/include/uapi/asm/unistd.h > b/arch/powerpc/include/uapi/asm/unistd.h > index b1980fcd56d5..972a7d68c143 100644 > --- a/arch/powerpc/include/uapi/asm/unistd.h > +++ b/arch/powerpc/include/uapi/asm/unistd.h > @

Re: [PATCH v2 14/18] powerpc: Define set_thread_used_vas()

2017-11-06 Thread Nicholas Piggin
On Fri, 6 Oct 2017 19:28:14 -0700 Sukadev Bhattiprolu wrote: > A CP_ABORT instruction is required in processes that have mapped a VAS > "paste address" with the intention of using COPY/PASTE instructions. > But since CP_ABORT is expensive, we want to restrict it to only processes > that use/inte

Re: [RFC PATCH for 4.15 10/14] cpu_opv: Wire up powerpc system call

2017-11-06 Thread Nicholas Piggin
On Tue, 7 Nov 2017 00:47:17 + (UTC) Mathieu Desnoyers wrote: > - On Nov 6, 2017, at 7:37 PM, Nicholas Piggin npig...@gmail.com wrote: > > > On Mon, 6 Nov 2017 15:56:40 -0500 > > Mathieu Desnoyers wrote: > > > >> diff --git a/arch/powerpc/incl

Re: POWER: Unexpected fault when writing to brk-allocated memory

2017-11-06 Thread Nicholas Piggin
is a problem. Thanks, Nick On Mon, 6 Nov 2017 09:32:25 +0100 Florian Weimer wrote: > On 11/06/2017 09:30 AM, Aneesh Kumar K.V wrote: > > On 11/06/2017 01:55 PM, Nicholas Piggin wrote: > >> On Mon, 6 Nov 2017 09:11:37 +0100 > >> Florian Weimer wrote: > >

Re: POWER: Unexpected fault when writing to brk-allocated memory

2017-11-07 Thread Nicholas Piggin
On Tue, 7 Nov 2017 09:15:21 +0100 Florian Weimer wrote: > On 11/07/2017 06:07 AM, Nicholas Piggin wrote: > > > First of all, using addr and MAP_FIXED to develop our heuristic can > > never really give unchanged ABI. It's an in-band signal. brk() is a > > goo

Re: POWER: Unexpected fault when writing to brk-allocated memory

2017-11-07 Thread Nicholas Piggin
On Tue, 7 Nov 2017 14:15:43 +0300 "Kirill A. Shutemov" wrote: > On Tue, Nov 07, 2017 at 04:07:05PM +1100, Nicholas Piggin wrote: > > C'ing everyone who was on the x86 56-bit user virtual address patch. > > > > I think we need more time to discuss this behav

<    5   6   7   8   9   10   11   >