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 18:11:07 +0530 "Aneesh Kumar K.V" wrote: > Nicholas Piggin writes: > > > On Tue, 27 Feb 2018 14:31:07 +0530 > > "Aneesh Kumar K.V" wrote: > > > >> Christophe Leroy writes: > >> > >> > The n

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

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

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

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

2017-11-11 Thread Nicholas Piggin
On Fri, 10 Nov 2017 12:08:35 + David Laight wrote: > From: Matthew Wilcox > > Sent: 09 November 2017 19:44 > > > > 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 mm

Re: powerpc-linux-gnu-ld: warning: orphan section `.data.rel.ro' from `arch/powerpc/kernel/head_44x.o' being placed in section `.data.rel.ro'.

2017-11-11 Thread Nicholas Piggin
he above patch, it was just hiding it. This should do the trick I think: -- powerpc/32: Add .data.rel* sections explicitly Match powerpc/64 and include .data.rel* input sections in the .data output section explicitly. This should solve the warning: powerpc-linux-gnu-ld: warning: orphan sec

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: 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-07 Thread Nicholas Piggin
On Tue, 7 Nov 2017 15:28:25 +0300 "Kirill A. Shutemov" wrote: > On Tue, Nov 07, 2017 at 10:56:36PM +1100, Nicholas Piggin wrote: > > > No, it won't. You will hit stack first. > > > > I guess so. Florian's bug didn't crash there for some reason,

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

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-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: [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: [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 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] powerpc/watchdog: Convert timers to use timer_setup()

2017-10-16 Thread Nicholas Piggin
idt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: linuxppc-...@lists.ozlabs.org > Signed-off-by: Kees Cook Looks fine to me. Is this intended to be merged via the powerpc tree in the next merge window? Acked-by: Nicholas Piggin > --- > arch/powe

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

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

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

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

[tip:timers/urgent] timers: Fix excessive granularity of new timers after a nohz idle

2017-08-24 Thread tip-bot for Nicholas Piggin
Commit-ID: 2fe59f507a65dbd734b990a11ebc7488f6f87a24 Gitweb: http://git.kernel.org/tip/2fe59f507a65dbd734b990a11ebc7488f6f87a24 Author: Nicholas Piggin AuthorDate: Tue, 22 Aug 2017 18:43:48 +1000 Committer: Thomas Gleixner CommitDate: Thu, 24 Aug 2017 11:40:18 +0200 timers: Fix

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

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

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

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

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,

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

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

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

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

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

<    3   4   5   6   7   8   9   10   11   >