Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomirski wrote: >> > On Jul 15, 2020, at 9:15 PM, Nicholas Piggin wrote: > >> > CPU0 CPU1 >> >

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
Excerpts from pet...@infradead.org's message of July 16, 2020 9:00 pm: > On Thu, Jul 16, 2020 at 08:03:36PM +1000, Nicholas Piggin wrote: >> Excerpts from Peter Zijlstra's message of July 16, 2020 6:50 pm: >> > On Wed, Jul 15, 2020 at 10:18:20PM -0700, Andy Lutomir

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-16 Thread Nicholas Piggin
;> >>> ----- On Jul 16, 2020, at 12:42 AM, Nicholas Piggin npig...@gmail.com wrote: >>>> I should be more complete here, especially since I was complaining >>>> about unclear barrier comment :) >>>> >>>> >>>> CPU0

Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Nicholas Piggin
H_RPTI_TYPE_NESTED while retrying the failed flush request with >> a full flush for the nested case. >> - s/psize_to_h_rpti/psize_to_rpti_pgsize >> >> v2: >> https://lore.kernel.org/linuxppc-dev/20200626131000.5207-1-bhar...@linux.ibm.com/T/#t >> >> Bharata

Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE

2020-07-16 Thread Nicholas Piggin
e_to_h_rpti/psize_to_rpti_pgsize >>> >>> v2: >>> https://lore.kernel.org/linuxppc-dev/20200626131000.5207-1-bhar...@linux.ibm.com/T/#t >>> >>> Bharata B Rao (2): >>> powerpc/mm: Enable radix GTSE only if supported. >>> powerpc/pseries:

Re: [PATCH v7 05/12] mm: HUGE_VMAP arch support cleanup

2020-09-13 Thread Nicholas Piggin
Excerpts from Tang Yizhou's message of September 11, 2020 8:36 pm: > On 2020/8/25 22:57, Nicholas Piggin wrote: >> -int __init arch_ioremap_pud_supported(void) >> +bool arch_vmap_pud_supported(pgprot_t prot); >> { >> /* >> * Only 4k g

Re: [PATCH v1 4/5] powerpc/fault: Avoid heavy search_exception_tables() verification

2020-09-13 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of September 9, 2020 4:20 pm: > > > Le 09/09/2020 à 08:04, Aneesh Kumar K.V a écrit : >> Christophe Leroy writes: >> >>> search_exception_tables() is an heavy operation, we have to avoid it. >>> When KUAP is selected, we'll know the fault has been blocke

Re: [PATCH] spi: fsl-espi: Only process interrupts for expected events

2020-09-13 Thread Nicholas Piggin
Excerpts from Chris Packham's message of September 14, 2020 8:03 am: > Hi All, > > On 4/09/20 12:28 pm, Chris Packham wrote: >> The SPIE register contains counts for the TX FIFO so any time the irq >> handler was invoked we would attempt to process the RX/TX fifos. Use the >> SPIM value to mask th

[PATCH v2 0/4] more mm switching vs TLB shootdown and lazy tlb fixes

2020-09-13 Thread Nicholas Piggin
ll leave patch 3 with you. Thanks, Nick Since v1: - Updates from Michael Ellerman's review comments. Nicholas Piggin (4): mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM sparc64: remove mm_cpumask clearing to fix kth

[PATCH v2 1/4] mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race

2020-09-13 Thread Nicholas Piggin
preempt race, and provide an arch option to extend that to activate_mm which allows architectures doing IPI based TLB shootdowns to close the second race. This is a bit ugly, but in the interest of fixing the bug and backporting before all architectures are converted this is a compromise. Signed-off-

[PATCH v2 2/4] powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM

2020-09-13 Thread Nicholas Piggin
powerpc uses IPIs in some situations to switch a kernel thread away from a lazy tlb mm, which is subject to the TLB flushing race described in the changelog introducing ARCH_WANT_IRQS_OFF_ACTIVATE_MM. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 1 + arch/powerpc

[PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-13 Thread Nicholas Piggin
mm_cpumask clearing code. The optimisation could be effectively restored by sending IPIs to mm_cpumask members and having them remove themselves from mm_cpumask. This is more tricky so I leave it as an exercise for someone with a sparc64 SMP. powerpc has a (currently similarly broken) example. Signed-off

[PATCH v2 4/4] powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm

2020-09-13 Thread Nicholas Piggin
) vs TLB invalidate") and ARCH_WANT_IRQS_OFF_ACTIVATE_MM to disable irqs over mm switch sequences. Reviewed-by: Michael Ellerman Depends-on: 38cf307c1f20 ("mm: fix kthread_use_mm() vs TLB invalidate") Fixes: 0cef77c7798a7 ("powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumas

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Nicholas Piggin
ar because openbios isn't populating an SMP device tree, which blows up everywhere. The patch is _relatively_ simple, hopefully it shouldn't explode, so it's probably ready for testing on real SMP hardware, if someone has a few cycles. Thanks, Nick > > Signed-off-by: Nicholas Pi

Re: [PATCH v2 1/4] mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race

2020-09-14 Thread Nicholas Piggin
Excerpts from pet...@infradead.org's message of September 14, 2020 8:56 pm: > On Mon, Sep 14, 2020 at 02:52:16PM +1000, Nicholas Piggin wrote: >> Reading and modifying current->mm and current->active_mm and switching >> mm should be done with irqs off, to prevent ra

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Nicholas Piggin
Excerpts from Anatoly Pugachev's message of September 14, 2020 8:23 pm: > On Mon, Sep 14, 2020 at 10:00 AM Nicholas Piggin wrote: >> >> Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm: >> >> [...] >> >> > The basic fix f

Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race

2020-09-14 Thread Nicholas Piggin
Excerpts from David Miller's message of September 15, 2020 5:59 am: > From: Nicholas Piggin > Date: Mon, 14 Sep 2020 14:52:18 +1000 > > ... >> The basic fix for sparc64 is to remove its mm_cpumask clearing code. The >> optimisation could be effectively restored

[PATCH 2/2] mm/large system hash: clear hashdist when only one node with memory is booted

2019-06-05 Thread Nicholas Piggin
noise, under 1% difference, page tables are likely to be well cached for this workload). Signed-off-by: Nicholas Piggin --- mm/page_alloc.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 15f46be

[PATCH 1/2] mm/large system hash: use vmalloc for size > MAX_ORDER when !hashdist

2019-06-05 Thread Nicholas Piggin
or "linear" in the kernel log message. Signed-off-by: Nicholas Piggin --- This is a better solution than the previous one for the case of !NUMA systems running on CONFIG_NUMA kernels, we can clear the default hashdist early and have everything allocated out of the linear map. The hu

Re: [PATCH 1/2] mm/large system hash: use vmalloc for size > MAX_ORDER when !hashdist

2019-06-05 Thread Nicholas Piggin
Andrew Morton's on June 6, 2019 7:22 am: > On Thu, 6 Jun 2019 00:48:13 +1000 Nicholas Piggin wrote: > >> The kernel currently clamps large system hashes to MAX_ORDER when >> hashdist is not set, which is rather arbitrary. >> >> vmalloc space is limited on

Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure

2019-06-11 Thread Nicholas Piggin
Christoph Hellwig's on June 12, 2019 12:41 am: > Instead of passing a set of always repeated arguments down the > get_user_pages_fast iterators, create a struct gup_args to hold them and > pass that by reference. This leads to an over 100 byte .text size > reduction for x86-64. What does this do

Re: [PATCH v2] ocxl: Allow contexts to be attached with a NULL mm

2019-06-19 Thread Nicholas Piggin
Signed-off-by: Alastair D'Silva Yeah I don't think you need to manage a kernel context explicitly because it will always be flushed with tlbie, comment helps. For the powerpc/mm bit, Acked-by: Nicholas Piggin

Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure

2019-06-20 Thread Nicholas Piggin
Linus Torvalds's on June 12, 2019 11:09 am: > On Tue, Jun 11, 2019 at 2:55 PM Nicholas Piggin wrote: >> >> What does this do for performance? I've found this pattern can be >> bad for store aliasing detection. > > I wouldn't expect it to be noticeable

Re: [PATCH 16/16] mm: pass get_user_pages_fast iterator arguments in a structure

2019-06-21 Thread Nicholas Piggin
Linus Torvalds's on June 21, 2019 3:21 am: > On Thu, Jun 20, 2019 at 5:19 AM Nicholas Piggin wrote: >> >> The processor aliasing problem happens because the struct will >> be initialised with stores using one base register (e.g., stack >> register), and th

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

2019-05-15 Thread Nicholas Piggin
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 >>> should enter into based on heuristics that depen

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

2019-05-15 Thread Nicholas Piggin
Gautham R Shenoy's on May 16, 2019 3:36 pm: > 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&#

Re: linux-next: boot failure after merge of the akpm tree

2019-05-30 Thread Nicholas Piggin
Stephen Rothwell's on May 30, 2019 4:17 pm: > Hi all, > > My qemu boot (PowerPC le guest on PowerPC le host, with and without kvm, > using a kernel built with powerpc_pseries_le_defconfig) oopses during boot > like this: > >

[PATCH] kernel/isolation: Asset that a housekeeping CPU comes up at boot time

2019-06-01 Thread Nicholas Piggin
reliably happen when advanced parameters are used incorrectly. Signed-off-by: Nicholas Piggin --- kernel/sched/isolation.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index 123ea07a3f3b..7b9e1e0d4ec3 100644 ---

Re: [PATCH 0/4] Allow CPU0 to be nohz full

2019-04-11 Thread Nicholas Piggin
Paul E. McKenney's on April 12, 2019 1:42 am: > On Tue, Apr 09, 2019 at 07:21:54PM +1000, Nicholas Piggin wrote: >> Thomas Gleixner's on April 6, 2019 3:54 am: >> > On Fri, 5 Apr 2019, Nicholas Piggin wrote: >> >> Thomas Gleixner's on April 5, 2019 1

Re: your mail

2019-04-11 Thread Nicholas Piggin
of more use when CPU0 is _not_ a housekeeping one, and that's where I've done most testing, but I don't see any hard dependency. Thanks, Nick > > On Thu, Apr 11, 2019 at 04:05:36PM +1000, Nicholas Piggin wrote: >> Date: Tue, 9 Apr 2019 20:23:16 +1000 >> Subject:

[PATCH] kernel/sched: run nohz idle load balancer on HK_FLAG_MISC CPUs

2019-04-11 Thread Nicholas Piggin
problem was observed with increased jitter on an application running on CPU0, caused by nohz idle load balancing being run on CPU1 (an SMT sibling). Signed-off-by: Nicholas Piggin --- kernel/sched/fair.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/kernel

Re: wait_on_page_bit_common(TASK_KILLABLE, EXCLUSIVE) can miss wakeup?

2020-06-28 Thread Nicholas Piggin
Excerpts from Linus Torvalds's message of June 28, 2020 3:39 pm: > On Fri, Jun 26, 2020 at 8:43 AM Peter Zijlstra wrote: >> >> I ended up with something like the below.. but it is too warm to think >> properly. >> >> I don't particularly like WQ_FLAG_PAGEWAITERS, but I liked open-coding >> all tha

Re: wait_on_page_bit_common(TASK_KILLABLE, EXCLUSIVE) can miss wakeup?

2020-06-29 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of June 29, 2020 1:28 pm: > Excerpts from Linus Torvalds's message of June 28, 2020 3:39 pm: >> On Fri, Jun 26, 2020 at 8:43 AM Peter Zijlstra wrote: >>> >>> I ended up with something like the below.. but it is too warm to think >>> properly. >>> >>> I don't

Re: [PATCH v2 1/1] powerpc/crash: Use NMI context for printk when starting to crash

2020-05-12 Thread Nicholas Piggin
Excerpts from Leonardo Bras's message of May 13, 2020 7:45 am: > Currently, if printk lock (logbuf_lock) is held by other thread during > crash, there is a chance of deadlocking the crash on next printk, and > blocking a possibly desired kdump. > > At the start of default_machine_crash_shutdown, m

Re: [PATCH v5 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-16 Thread Nicholas Piggin
Excerpts from Leonardo Bras's message of May 16, 2020 3:21 pm: > Implement rtas_call_reentrant() for reentrant rtas-calls: > "ibm,int-on", "ibm,int-off",ibm,get-xive" and "ibm,set-xive". > > On LoPAPR Version 1.1 (March 24, 2016), from 7.3.10.1 to 7.3.10.4, > items 2 and 3 say: > > 2 - For the P

Re: [PATCH v5 2/2] powerpc/rtas: Implement reentrant rtas call

2020-05-17 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of May 16, 2020 5:36 pm: > Excerpts from Leonardo Bras's message of May 16, 2020 3:21 pm: >> @@ -202,6 +220,7 @@ void __init __nostackprotector initialise_paca(struct >> paca_struct *new_paca, int >> /* For now -- if we have threads this will be adjuste

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

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

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

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

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

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

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 &

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-12 Thread Nicholas Piggin
On Wed, 12 Jul 2017 09:29:40 -0700 Andi Kleen wrote: > Nicholas Piggin writes: > >> > >> I think we should aim for gc-sections to be used by default and have LTO > >> as a possible option only. > > > > I agree after it starts getting implemented

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: [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
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: 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-30 Thread Nicholas Piggin
On Fri, 30 Jun 2017 10:52:18 +0530 Abdul Haleem wrote: > On Fri, 2017-06-30 at 00:45 +1000, Nicholas Piggin wrote: > > On Thu, 29 Jun 2017 20:23:05 +1000 > > Nicholas Piggin wrote: > > > > > On Thu, 29 Jun 2017 19:36:14 +1000 > > > Nicholas Piggin

[PATCH] powerpc/64s: watchdog false positive warning at CPU unplug

2017-06-30 Thread Nicholas Piggin
ned-off-by: Nicholas Piggin --- arch/powerpc/kernel/watchdog.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c index d46040c0da40..93395a53336b 100644 --- a/arch/powerpc/kernel/watchdog.c +++ b/arch/powe

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

2017-06-30 Thread Nicholas Piggin
On Thu, 29 Jun 2017 22:57:33 +0200 "Rafael J. Wysocki" wrote: > On Mon, Jun 26, 2017 at 7:38 AM, Nicholas Piggin wrote: > > The menu driver does not allow state0 to be disabled completely. > > If it is disabled but other enabled states don't meet latency >

Re: [PATCH 1/5] powernv:idle: Move device-tree parsing to one place.

2017-07-08 Thread Nicholas Piggin
On Fri, 7 Jul 2017 16:55:39 +0530 Gautham R Shenoy wrote: > Hello Nicholas, > > On Fri, Jul 07, 2017 at 12:53:40AM +1000, Nicholas Piggin wrote: > > I wouldn't have the wrapper function... but it's your code so it's > > up to you. One thing though is tha

Re: [PATCH 4/5] powernv:idle: Move initialization of sibling pacas to pnv_alloc_idle_core_states

2017-07-08 Thread Nicholas Piggin
On Fri, 7 Jul 2017 20:34:16 +0530 Gautham R Shenoy wrote: > On Fri, Jul 07, 2017 at 01:16:09AM +1000, Nicholas Piggin wrote: > > On Wed, 5 Jul 2017 22:08:15 +0530 > > "Gautham R. Shenoy" wrote: > > > > > From: "Gautham R. Shenoy" &g

Re: [PATCH 5/5] powernv:idle: Disable LOSE_FULL_CONTEXT states when stop-api fails.

2017-07-08 Thread Nicholas Piggin
On Fri, 7 Jul 2017 23:07:10 +0530 Gautham R Shenoy wrote: > On Fri, Jul 07, 2017 at 01:29:16AM +1000, Nicholas Piggin wrote: > > On Wed, 5 Jul 2017 22:08:16 +0530 > > "Gautham R. Shenoy" wrote: > > > > > From: "Gautham R. Shenoy&q

[RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-08 Thread Nicholas Piggin
Allow x86 to select DCDE option under CONFIG_EXPERT to reduce binary size. This is an RFC only for ~4.14/15 kernel. Sending as a single patch to make it easy to review and test for x86, and give other archs a base to look at. This is a _relatively_ simple and low overhead first step to getting so

Re: [RFC PATCH] x86: enable dead code and data elimination (LTO)

2017-07-09 Thread Nicholas Piggin
On Sun, 9 Jul 2017 09:59:44 -0400 (EDT) Nicolas Pitre wrote: > On Sun, 9 Jul 2017, Masahiro Yamada wrote: > > > Hi. > > > > 2017-07-09 18:05 GMT+09:00 Ingo Molnar : > > > > > > * Nicholas Piggin wrote: > > > > > >> FY

Re: [PATCH 1/5] powernv:idle: Move device-tree parsing to one place.

2017-07-06 Thread Nicholas Piggin
On Wed, 5 Jul 2017 22:08:12 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > The details of the platform idle state are exposed by the firmware to > the kernel via device tree. > > In the current code, we parse the device tree twice : > > 1) During the boot up in arch/powerpc

Re: [PATCH 2/5] powernv:idle: Change return type of pnv_probe_idle_states to int

2017-07-06 Thread Nicholas Piggin
; pnv_init_idle_states. > > Signed-off-by: Gautham R. Shenoy Looks good to me. Reviewed-by: Nicholas Piggin I wonder if the warnings are strong enough here to let people know idle won't be used so power consumption will be high and performance significantly reduced on SMT machines?

Re: [PATCH 3/5] powernv:idle: Define idle init function for power8

2017-07-06 Thread Nicholas Piggin
- PPC_INST_NOP); > - patch_instruction( > - (unsigned int *)pnv_fastsleep_workaround_at_exit, > - PPC_INST_NOP); So previously this would run on POWER9 and patch out those branches. But POWER9 never runs that code, so no problem. Good cleanup. Reviewed-by: Nicholas Piggin

Re: [PATCH 4/5] powernv:idle: Move initialization of sibling pacas to pnv_alloc_idle_core_states

2017-07-06 Thread Nicholas Piggin
move the thread_sibling_pacas allocation to here? Speaking of which... core_idle_state and thread_sibling_pacas are allocated with kmalloc_node... What happens if we take an SLB miss in the idle wakeup code on these guys? Nothing good I think. Perhaps we should put them into the pacas or somewhere in bolted memory. Good cleanup though. Reviewed-by: Nicholas Piggin

Re: [PATCH 5/5] powernv:idle: Disable LOSE_FULL_CONTEXT states when stop-api fails.

2017-07-06 Thread Nicholas Piggin
On Wed, 5 Jul 2017 22:08:16 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > Currently, we use the opal call opal_slw_set_reg() to inform the that > the Sleep-Winkle Engine (SLW) to restore the contents of some of the > Hypervisor state on wakeup from deep idle states that lose

Re: parisc:generic-64bit_defconfig build failures due to 'kbuild: handle libs-y archives separately...'

2017-07-18 Thread Nicholas Piggin
build test parisc/generic-64bit_defconfig, I wonder? Thanks, Nick > > Ursprüngliche Nachricht > Von: Guenter Roeck > Datum: 18.07.17 17:21 (GMT+01:00) > An: Nicholas Piggin > Cc: linux-kernel@vger.kernel.org, Masahiro Yamada > , "Jam

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

2017-07-18 Thread Nicholas Piggin
Thanks for working on these patches. We really need to get this stuff merged and tested asap :) On Tue, 18 Jul 2017 19:58:49 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > > Currently we use the stop-api provided by the firmware to program the > SLW engine to restore the val

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

2017-07-18 Thread Nicholas Piggin
On Wed, 19 Jul 2017 10:34:59 +0530 Gautham R Shenoy wrote: > Hello Nicholas, > > On Wed, Jul 19, 2017 at 12:14:12PM +1000, Nicholas Piggin wrote: > > Thanks for working on these patches. We really need to get this stuff > > merged and tested asap :) > > > &g

Re: [v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle

2017-07-19 Thread Nicholas Piggin
Also perhaps just a little comment in the code explaining why power8 does not need this because it only uses it for hotplug as you do in the changelog would help when reading the code. Sorry I didn't pick this up on your v1 patches. If you change those minor things, please add Reviewed-by: Nicholas Piggin Thanks, Nick

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

2017-07-19 Thread Nicholas Piggin
opal_slw_set_reg(pir, SPRN_LPCR, lpcr_val); Is opal_slw_set_reg very heavyweight? If not, I would just remove the POWER9 special casing entirely from both these functions, which follows the principle of least surprise. Otherwise I guess it's reasonable. Thanks for making those other changes, it looks good. Reviewed-by: Nicholas Piggin

Re: undefined reference to `_GLOBAL_OFFSET_TABLE_'

2017-07-22 Thread Nicholas Piggin
On Sun, 23 Jul 2017 08:20:30 +0800 kbuild test robot wrote: > Hi Nicholas, > > FYI, the error/warning still remains. FYI, I still suspect it is this bug https://sourceware.org/bugzilla/show_bug.cgi?id=21017 If so, then I'm not sure if it can be worked around in Linux. Thanks, Nick > > tre

Re: linux/drivers/cpuidle: cpuidle_enter_state() issue

2018-02-07 Thread Nicholas Piggin
On Wed, 7 Feb 2018 14:51:56 +0100 "Rafael J. Wysocki" wrote: > On 2/7/2018 7:59 AM, Li Wang wrote: > > Hi Kernel-developers, > > > > The flowing call trace was catch from kernel-v4.15, could anyone help > > to analysis the cpuidle problem? > > or, if you need any more detail info pls let me know.

Re: [PATCH v4 1/5] powerpc/mm/slice: Remove intermediate bitmap copy

2018-02-10 Thread Nicholas Piggin
the slice code all of a sudden. I had the same change in my series I just posted, but I didn't notice this one of yours earlier, and it's better split out, so this is fine by me. Reviewed-by: Nicholas Piggin > > Signed-off-by: Christophe Leroy > Reviewed-by: Aneesh Kumar K.V

Re: [PATCH v4 2/5] powerpc/mm/slice: Enhance for supporting PPC32

2018-02-11 Thread Nicholas Piggin
On Sat, 10 Feb 2018 13:54:27 +0100 (CET) Christophe Leroy wrote: > In preparation for the following patch which will fix an issue on > the 8xx by re-using the 'slices', this patch enhances the > 'slices' implementation to support 32 bits CPUs. > > On PPC32, the address space is limited to 4Gbyte

Re: [PATCH v4 2/5] powerpc/mm/slice: Enhance for supporting PPC32

2018-02-11 Thread Nicholas Piggin
On Sun, 11 Feb 2018 21:04:42 +0530 "Aneesh Kumar K.V" wrote: > On 02/11/2018 07:29 PM, Nicholas Piggin wrote: > > On Sat, 10 Feb 2018 13:54:27 +0100 (CET) > > Christophe Leroy wrote: > > > >> In preparation for the following patch which will fix

Re: [PATCH v5 2/6] powerpc/mm/slice: create header files dedicated to slices

2018-02-23 Thread Nicholas Piggin
his. Even by itself it seems like a good cleanup. Reviewed-by: Nicholas Piggin > --- > v5: new - come from a split of patch 2 of v4 > > arch/powerpc/include/asm/book3s/64/slice.h | 27 ++ > arch/powerpc/include/asm/nohash/64/slice.h | 12 ++ > arch/powerpc/include

Re: [PATCH v5 3/6] powerpc/mm/slice: Enhance for supporting PPC32

2018-02-23 Thread Nicholas Piggin
pc/mm bits in the next patch. I wonder if you would move them over? Then the next patch could be called powerpc/8xx: ? Anyway it's not a big deal. Reviewed-by: Nicholas Piggin

Re: [PATCH AUTOSEL for 3.18 36/40] powerpc/xmon: Avoid tripping SMP hardlockup watchdog

2018-02-02 Thread Nicholas Piggin
On Tue, 30 Jan 2018 15:35:54 +1100 Michael Ellerman wrote: > alexander.le...@verizon.com writes: > > > On Thu, Dec 14, 2017 at 12:10:39AM +1100, Michael Ellerman wrote: > >>alexander.le...@verizon.com writes: > >> > >>> From: Nich

Re: [RFC REBASED 3/5] powerpc/mm/slice: implement slice_check_range_fits

2018-02-27 Thread Nicholas Piggin
On Tue, 27 Feb 2018 12:50:08 +0530 "Aneesh Kumar K.V" wrote: > Christophe Leroy writes: > +if ((start + len) > SLICE_LOW_TOP) { > > + unsigned long start_index = GET_HIGH_SLICE_INDEX(start); > > + unsigned long align_end = ALIGN(end, (1UL << SLICE_HIGH_SHIFT)); > > +

Re: [RFC REBASED 4/5] powerpc/mm/slice: Use const pointers to cached slice masks where possible

2018-02-27 Thread Nicholas Piggin
On Tue, 27 Feb 2018 12:59:53 +0530 "Aneesh Kumar K.V" wrote: > Christophe Leroy writes: > > > The slice_mask cache was a basic conversion which copied the slice > > mask into caller's structures, because that's how the original code > > worked. In most cases the pointer can be used directly ins

Re: [RFC REBASED 5/5] powerpc/mm/slice: use the dynamic high slice size to limit bitmap operations

2018-02-27 Thread Nicholas Piggin
On Tue, 27 Feb 2018 14:31:07 +0530 "Aneesh Kumar K.V" wrote: > Christophe Leroy writes: > > > The number of high slices a process might use now depends on its > > address space size, and what allocation address it has requested. > > > > This patch uses that limit throughout call chains where po

Re: [PATCH] cpufreq: powernv: Return the actual CPU frequency in /proc/cpuinfo

2017-11-16 Thread Nicholas Piggin
On Fri, 6 Oct 2017 12:54:08 +0530 Shriya wrote: > Make /proc/cpuinfo read the frequency of the CPU it is running at > instead of reading the cached value of the last requested frequency. > In conditions like WOF/throttle CPU can be running at a different > frequency than the requested frequency.

[PATCH] tracing/irqtrace: only call trace_hardirqs_on/off when state changes

2017-11-16 Thread Nicholas Piggin
art they are harmless, but they can indicate that the caller has lost track of its irq state. Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-kernel@vger.kernel.org Signed-off-by: Nicholas Piggin --- I wonder what you think of this patch? After a small fix to init/main.c and some powerpc fixes, I

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-18 Thread Nicholas Piggin
On Mon, 18 Dec 2017 12:56:22 -0600 Josh Poimboeuf wrote: > On Mon, Dec 18, 2017 at 03:33:34PM +1000, Nicholas Piggin wrote: > > On Sun, 17 Dec 2017 20:58:54 -0600 > > Josh Poimboeuf wrote: > > > > > On Fri, Dec 15, 2017 at 07:40:09PM +1000, Nicholas Piggin w

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-15 Thread Nicholas Piggin
On Tue, 12 Dec 2017 08:05:01 -0600 Josh Poimboeuf wrote: > On Tue, Dec 12, 2017 at 12:39:12PM +0100, Torsten Duwe wrote: > > Hi all, > > > > The "Power Architecture 64-Bit ELF V2 ABI" says in section 2.3.2.3: > > > > [...] There are several rules that must be adhered to in order to ensure > > r

Re: [PATCH] On ppc64le we HAVE_RELIABLE_STACKTRACE

2017-12-17 Thread Nicholas Piggin
On Sun, 17 Dec 2017 20:58:54 -0600 Josh Poimboeuf wrote: > On Fri, Dec 15, 2017 at 07:40:09PM +1000, Nicholas Piggin wrote: > > On Tue, 12 Dec 2017 08:05:01 -0600 > > Josh Poimboeuf wrote: > > > > > On Tue, Dec 12, 2017 at 12:39:12PM +0100, Torste

[PATCH] kernel/watchdog: fix Kconfig constraints for perf hardlockup watchdog

2017-08-10 Thread Nicholas Piggin
EVENTS it seems reasonable to make the dependency explicit. Fixes: 05a4a9527931 ("kernel/watchdog: split up config options") Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 2 +- arch/x86/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ar

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

2017-09-14 Thread Nicholas Piggin
On Thu, 14 Sep 2017 15:59:50 -0700 Florian Fainelli wrote: > On 09/07/2017 09:36 PM, Florian Fainelli wrote: > > > > > > On 09/07/2017 06:19 AM, Nicholas Piggin wrote: > >> On Thu, 7 Sep 2017 05:50:30 -0700 > >> Florian Fainelli wrote: > >>

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

2017-08-28 Thread Nicholas Piggin
On Mon, 28 Aug 2017 13:03:31 -0700 Florian Fainelli wrote: > On 05/21/2017 07:46 PM, Nicholas Piggin wrote: > > On Sat, 20 May 2017 20:33:35 -0700 > > Florian Fainelli wrote: > > > >> Commit db2aa7fd15e8 ("initramfs: allow again choice of the embedded

<    4   5   6   7   8   9   10   11   >