[PATCH v2 14/20] mm: Provide speculative fault infrastructure

2017-08-17 Thread Laurent Dufour
From: Peter Zijlstra Provide infrastructure to do a speculative fault (not holding mmap_sem). The not holding of mmap_sem means we can race against VMA change/removal and page-table destruction. We use the SRCU VMA freeing to keep the VMA around. We use the VMA seqcount to detect change (includi

[PATCH v2 15/20] mm: Try spin lock in speculative path

2017-08-17 Thread Laurent Dufour
There is a deadlock when a CPU is doing a speculative page fault and another one is calling do_unmap(). The deadlock occurred because the speculative path try to spinlock the pte while the interrupt are disabled. When the other CPU in the unmap's path has locked the pte then is waiting for all the

[PATCH v2 16/20] mm: Adding speculative page fault failure trace events

2017-08-17 Thread Laurent Dufour
This patch a set of new trace events to collect the speculative page fault event failures. Signed-off-by: Laurent Dufour --- include/trace/events/pagefault.h | 87 mm/memory.c | 68 --- 2 files changed, 141

[PATCH v2 17/20] perf: Add a speculative page fault sw event

2017-08-17 Thread Laurent Dufour
Add a new software event to count succeeded speculative page faults. Signed-off-by: Laurent Dufour --- include/uapi/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index b1c0b187acfe..3043ec0988e9 100644 ---

[PATCH v2 18/20] perf tools: Add support for the SPF perf event

2017-08-17 Thread Laurent Dufour
Add support for the new speculative faults event. Signed-off-by: Laurent Dufour --- tools/include/uapi/linux/perf_event.h | 1 + tools/perf/util/evsel.c | 1 + tools/perf/util/parse-events.c| 4 tools/perf/util/parse-events.l| 1 + tools/perf/util/python.c

[PATCH v2 19/20] x86/mm: Add speculative pagefault handling

2017-08-17 Thread Laurent Dufour
From: Peter Zijlstra Try a speculative fault before acquiring mmap_sem, if it returns with VM_FAULT_RETRY continue with the mmap_sem acquisition and do the traditional fault. Signed-off-by: Peter Zijlstra (Intel) [Clearing of FAULT_FLAG_ALLOW_RETRY is now done in handle_speculative_fault()] [

[PATCH v2 20/20] powerpc/mm: Add speculative page fault

2017-08-17 Thread Laurent Dufour
This patch enable the speculative page fault on the PowerPC architecture. This will try a speculative page fault without holding the mmap_sem, if it returns with WM_FAULT_RETRY, the mmap_sem is acquired and the traditional page fault processing is done. Support is only provide for BOOK3S_64 curre

Re: [RFT PATCH] tpm: ibmvtpm: simplify crq initialization and document crq format

2017-08-17 Thread msuchanek
ping? On Fri, 24 Feb 2017 20:35:16 +0100 Michal Suchanek wrote: > The crq is passed in registers and is the same on BE and LE hosts. > However, current implementation allocates a structure on-stack to > represent the crq, initializes the members swapping them to BE, and > loads the structure swa

Re: [RFC v6 21/62] powerpc: introduce execute-only pkey

2017-08-17 Thread Ram Pai
On Thu, Aug 17, 2017 at 04:35:55PM -0700, Ram Pai wrote: > On Wed, Aug 02, 2017 at 07:40:46PM +1000, Michael Ellerman wrote: > > Thiago Jung Bauermann writes: > > > > > Michael Ellerman writes: > > > > > >> Thiago Jung Bauermann writes: > > >>> Ram Pai writes: > > >> ... > > + > > +

Re: [RFC v7 25/25] powerpc: Enable pkey subsystem

2017-08-17 Thread Ram Pai
On Thu, Aug 17, 2017 at 05:30:27PM -0300, Thiago Jung Bauermann wrote: > > Ram Pai writes: > > > On Thu, Aug 10, 2017 at 06:27:34PM -0300, Thiago Jung Bauermann wrote: > >> > >> Ram Pai writes: > >> > --- a/arch/powerpc/include/asm/cputable.h > >> > +++ b/arch/powerpc/include/asm/cputable.h >

Re: [RFC v7 26/25] mm/mprotect, powerpc/mm/pkeys, x86/mm/pkeys: Add sysfs interface

2017-08-17 Thread Ram Pai
On Fri, Aug 11, 2017 at 02:34:43PM -0300, Thiago Jung Bauermann wrote: > Expose useful information for programs using memory protection keys. > Provide implementation for powerpc and x86. > > On a powerpc system with pkeys support, here is what is shown: > > $ head /sys/kernel/mm/protection_keys/

[PATCH 1/2] kvm/xive: Workaround P9 DD1.0 bug with IPB bit loss

2017-08-17 Thread Benjamin Herrenschmidt
Thankfully it only happens when manually manipulating CPPR which is rather quite rare. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kvm/book3s_xive_template.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xive_template.c b/arch

[PATCH 2/2] kvm/xive: Add missing barriers and document them

2017-08-17 Thread Benjamin Herrenschmidt
This adds missing memory barriers to order updates/tests of the virtual CPPR and MFRR, thus fixing a lost IPI problem. While at it also document all barriers in this file This fixes a bug causing guest IPIs to occasionally get lost. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kvm/bo

Re: WARNING: CPU: 15 PID: 0 at block/blk-mq.c:1111 __blk_mq_run_hw_queue+0x1d8/0x1f0

2017-08-17 Thread Abdul Haleem
On Thu, 2017-08-17 at 14:18 -0500, Brian King wrote: > On 08/17/2017 10:32 AM, Bart Van Assche wrote: > > On Wed, 2017-08-16 at 15:10 -0500, Brian King wrote: > >> On 08/16/2017 01:15 PM, Bart Van Assche wrote: > >>> On Wed, 2017-08-16 at 23:37 +0530, Abdul Haleem wrote: > Linux-next booted wi

Re: [RFC v7 24/25] powerpc: Deliver SEGV signal on pkey violation

2017-08-17 Thread Michael Ellerman
Ram Pai writes: > On Fri, Aug 11, 2017 at 08:26:30PM +1000, Michael Ellerman wrote: >> Thiago Jung Bauermann writes: >> >> > Ram Pai writes: >> > >> >> The value of the AMR register at the time of exception >> >> is made available in gp_regs[PT_AMR] of the siginfo. ... >> >> I don't understand

Re: [RFC v7 25/25] powerpc: Enable pkey subsystem

2017-08-17 Thread Michael Ellerman
Ram Pai writes: > On Thu, Aug 17, 2017 at 05:30:27PM -0300, Thiago Jung Bauermann wrote: >> Ram Pai writes: >> > On Thu, Aug 10, 2017 at 06:27:34PM -0300, Thiago Jung Bauermann wrote: >> >> Ram Pai writes: >> >> > @@ -227,6 +229,24 @@ static inline void pkey_mm_init(struct mm_struct >> >> > *mm

32-bit powerpc, aty128fb: vmap allocation for size 135168 failed

2017-08-17 Thread Meelis Roos
I was trying 4.13.0-rc5-00075-gac9a40905a61 on my PowerMac G4 with 1G RAM and after some time of sddm respawning and X trying to restart, dmesg is full of messages about vmap allocation failures. Maybe the aty128fb is leaking ROM allocations or something like that? sddm has been crashing eearli

<    1   2