Re: [PATCH] powerpc/powernv/prd: Validate whether address to be mapped is part of system RAM

2019-10-03 Thread Jeremy Kerr
Hi Vasant, > > OK. How about we just don't do that? > > Yes. Hostboot will fix that. It will make sure that HBRT is loaded > into regular memory. Super. > > It sounds like we're just trying to work around an invalid > > representation of the mappings. > > Its not workaround. Its additional che

Re: [PATCH v5 01/11] asm-generic/pgtable: Adds generic functions to monitor lockless pgtable walks

2019-10-03 Thread Peter Zijlstra
On Wed, Oct 02, 2019 at 10:33:15PM -0300, Leonardo Bras wrote: > diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h > index 818691846c90..3043ea9812d5 100644 > --- a/include/asm-generic/pgtable.h > +++ b/include/asm-generic/pgtable.h > @@ -1171,6 +1171,64 @@ static inline bo

Re: [PATCH v5 00/11] Introduces new count-based method for tracking lockless pagetable walks

2019-10-03 Thread Peter Zijlstra
On Wed, Oct 02, 2019 at 10:33:14PM -0300, Leonardo Bras wrote: > If a process (qemu) with a lot of CPUs (128) try to munmap() a large > chunk of memory (496GB) mapped with THP, it takes an average of 275 > seconds, which can cause a lot of problems to the load (in qemu case, > the guest will lock f

Re: [PATCH v5 10/11] mm/Kconfig: Adds config option to track lockless pagetable walks

2019-10-03 Thread Peter Zijlstra
On Wed, Oct 02, 2019 at 10:33:24PM -0300, Leonardo Bras wrote: > Adds config option LOCKLESS_PAGE_TABLE_WALK_TRACKING to make possible > enabling tracking lockless pagetable walks directly from kernel config. > > Signed-off-by: Leonardo Bras > --- > mm/Kconfig | 11 +++ > 1 file changed,

Re: [PATCH] powerpc/perf: Add functionality to check PERF_EVENTS config option

2019-10-03 Thread maddy
On 10/1/19 2:51 PM, Kajol Jain wrote: Perf is the primary interface to program performance monitoring unit (pmu) and collect counter data in system. But currently pmu register files are created in the /sys/devices/system/cpu/cpu* without checking CONFIG_PERF_EVENTS option. These includes PMC* a

Re: [PATCH v6 3/3] PCI: layerscape: Add LS1028a support

2019-10-03 Thread Shawn Guo
On Mon, Sep 02, 2019 at 11:43:19AM +0800, Xiaowei Bao wrote: > Add support for the LS1028a PCIe controller. > > Signed-off-by: Xiaowei Bao > Signed-off-by: Hou Zhiqiang > --- > v2: > - No change. > v3: > - Reuse the ls2088 driver data structurt. > v4: > - No change. > v5: > - No change. > v6

Re: [PATCH] powerpc/powernv/prd: Validate whether address to be mapped is part of system RAM

2019-10-03 Thread Vaidyanathan Srinivasan
* Jeremy Kerr [2019-10-03 15:07:24]: > Hi Vasant, > > > > OK. How about we just don't do that? > > > > Yes. Hostboot will fix that. It will make sure that HBRT is loaded > > into regular memory. > > Super. > > > > It sounds like we're just trying to work around an invalid > > > representation

[PATCH v2] powerpc/kernel/sysfs: Add PERF_EVENT config option check to PMU SPRs

2019-10-03 Thread Kajol Jain
Perf is the primary interface to program performance monitoring unit (pmu) and collect counter data in system. But currently pmu register files are created in the /sys/devices/system/cpu/cpu* without checking CONFIG_PERF_EVENTS option. These includes PMC* and MMCR* sprs. Patch ties sysfs pmu spr fi

Re: [PATCH v5 01/11] asm-generic/pgtable: Adds generic functions to monitor lockless pgtable walks

2019-10-03 Thread Peter Zijlstra
On Thu, Oct 03, 2019 at 09:11:45AM +0200, Peter Zijlstra wrote: > On Wed, Oct 02, 2019 at 10:33:15PM -0300, Leonardo Bras wrote: > > diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h > > index 818691846c90..3043ea9812d5 100644 > > --- a/include/asm-generic/pgtable.h > > +++

Re: [PATCH v5 01/10] mm/memunmap: Use the correct start and end pfn when removing pages from zone

2019-10-03 Thread Aneesh Kumar K.V
On 10/1/19 8:33 PM, David Hildenbrand wrote: On 01.10.19 16:57, David Hildenbrand wrote: On 01.10.19 16:40, David Hildenbrand wrote: From: "Aneesh Kumar K.V" With altmap, all the resource pfns are not initialized. While initializing pfn, altmap reserve space is skipped. Hence when removing pf

Re: [PATCH v5 10/11] mm/Kconfig: Adds config option to track lockless pagetable walks

2019-10-03 Thread Leonardo Bras
On Wed, 2019-10-02 at 22:08 -0400, Qian Cai wrote: > Can’t this name and all those new *lockless* function names be shorter? > There are many functions name with *_locked, so how about dropping > lockless at all, i.e., PAGE_TABLE_WALK_TRACKING blah blah? Thanks for the feedback! Well, in this c

Re: [PATCH] powerpc/vio: use simple dummy struct device as bus parent

2019-10-03 Thread Dan Streetman
On Fri, Sep 27, 2019 at 2:19 PM Greg Kroah-Hartman wrote: > > On Fri, Sep 27, 2019 at 09:04:02AM -0400, Dan Streetman wrote: > > The dummy vio_bus_device creates the /sys/devices/vio directory, which > > contains real vio devices under it; since it represents itself as having > > a bus = &vio_bus_

Re: [PATCH v5 10/11] mm/Kconfig: Adds config option to track lockless pagetable walks

2019-10-03 Thread Leonardo Bras
On Thu, 2019-10-03 at 16:04 -0300, Leonardo Bras wrote: > On Wed, 2019-10-02 at 22:08 -0400, Qian Cai wrote: > > Can’t this name and all those new *lockless* function names be shorter? > > There are many functions name with *_locked, so how about dropping > > lockless at all, i.e., PAGE_TABLE_WAL

Re: [PATCH] powerpc/vio: use simple dummy struct device as bus parent

2019-10-03 Thread Greg Kroah-Hartman
On Thu, Oct 03, 2019 at 03:10:03PM -0400, Dan Streetman wrote: > On Fri, Sep 27, 2019 at 2:19 PM Greg Kroah-Hartman > wrote: > > > > On Fri, Sep 27, 2019 at 09:04:02AM -0400, Dan Streetman wrote: > > > The dummy vio_bus_device creates the /sys/devices/vio directory, which > > > contains real vio d

Re: [PATCH v5 00/11] Introduces new count-based method for tracking lockless pagetable walks

2019-10-03 Thread Leonardo Bras
Hello Peter, thanks for the feedback! On Thu, 2019-10-03 at 09:29 +0200, Peter Zijlstra wrote: > On Wed, Oct 02, 2019 at 10:33:14PM -0300, Leonardo Bras wrote: > > If a process (qemu) with a lot of CPUs (128) try to munmap() a large > > chunk of memory (496GB) mapped with THP, it takes an average

Re: [PATCH v5 01/11] asm-generic/pgtable: Adds generic functions to monitor lockless pgtable walks

2019-10-03 Thread John Hubbard
On 10/3/19 4:51 AM, Peter Zijlstra wrote: > On Thu, Oct 03, 2019 at 09:11:45AM +0200, Peter Zijlstra wrote: >> On Wed, Oct 02, 2019 at 10:33:15PM -0300, Leonardo Bras wrote: ... > > I'm still really confused about this barrier. It just doesn't make > sense. > > If an interrupt happens before the

Re: [PATCH v5 10/11] mm/Kconfig: Adds config option to track lockless pagetable walks

2019-10-03 Thread Leonardo Bras
On Thu, 2019-10-03 at 09:44 +0200, Peter Zijlstra wrote: > This shouldn't be a user visible option at all. Either the arch needs > it and selects it or not. You are right. I will do that on v6. Thanks for the feedback! signature.asc Description: This is a digitally signed message part

Re: [PATCH v5 00/11] Introduces new count-based method for tracking lockless pagetable walks

2019-10-03 Thread John Hubbard
On 10/3/19 1:36 PM, Leonardo Bras wrote: > On Thu, 2019-10-03 at 09:29 +0200, Peter Zijlstra wrote: >> On Wed, Oct 02, 2019 at 10:33:14PM -0300, Leonardo Bras wrote: ... >> This is something entirely specific to Power, you shouldn't be touching >> generic code at all. > > Up to v4, I was declaring

[PATCH] selftests/powerpc: Fix compiling error on tlbie_test due to newer gcc

2019-10-03 Thread Desnes A. Nunes do Rosario
Newer versions of GCC demand that the size of the string to be copied must be explicitly smaller than the size of the destination. Thus, the NULL char has to be taken into account on strncpy. This will avoid the following compiling error: tlbie_test.c: In function 'main': tlbie_test.c:639:4:

Re: [PATCH v5 01/11] asm-generic/pgtable: Adds generic functions to monitor lockless pgtable walks

2019-10-03 Thread Leonardo Bras
Hello Peter, thanks for the feedback! On Thu, 2019-10-03 at 13:51 +0200, Peter Zijlstra wrote: > On Thu, Oct 03, 2019 at 09:11:45AM +0200, Peter Zijlstra wrote: > > On Wed, Oct 02, 2019 at 10:33:15PM -0300, Leonardo Bras wrote: > > > diff --git a/include/asm-generic/pgtable.h b/include/asm-generic

Re: [PATCH v5 00/11] Introduces new count-based method for tracking lockless pagetable walks

2019-10-03 Thread Leonardo Bras
On Thu, 2019-10-03 at 13:49 -0700, John Hubbard wrote: > Yes. And to clarify, I was assuming that the changes to mm/gup.c were > required in order to accomplish your goals. Given that assumption, I > wanted the generic code to be "proper", and that's what that feedback > is about. You assumed ri

Re: [PATCH 1/3] powerpc/book3s64/hash/4k: 4k supports only 16TB linear mapping

2019-10-03 Thread Michael Ellerman
On Tue, 2019-09-17 at 14:57:00 UTC, "Aneesh Kumar K.V" wrote: > With commit: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in > the > same 0xc range"), we now split the 64TB address range into 4 contexts each of > 16TB. That implies we can do only 16TB linear mapping. Make sure we d

Re: linux-next: build failure after merge of the powerpc tree

2019-10-03 Thread Michael Ellerman
On Mon, 2019-09-30 at 00:13:42 UTC, Stephen Rothwell wrote: > Hi all, > > After merging the powerpc tree, today's linux-next build (powerpc64 > allnoconfig) failed like this: > > arch/powerpc/mm/book3s64/pgtable.c: In function 'flush_partition': > arch/powerpc/mm/book3s64/pgtable.c:216:3: error:

Re: [PATCH] powerpc/pseries: Remove confusing warning message.

2019-10-03 Thread Michael Ellerman
On Tue, 2019-10-01 at 13:29:28 UTC, Laurent Dufour wrote: > Since the commit 1211ee61b4a8 ("powerpc/pseries: Read TLB Block Invalidate > Characteristics"), a warning message is displayed when booting a guest on > top of KVM: > > lpar: arch/powerpc/platforms/pseries/lpar.c > pseries_lpar_read_hblk

Re: [PATCH] selftests/powerpc: Fix compiling error on tlbie_test due to newer gcc

2019-10-03 Thread Michael Ellerman
On Thu, 2019-10-03 at 21:10:10 UTC, "Desnes A. Nunes do Rosario" wrote: > Newer versions of GCC demand that the size of the string to be copied must > be explicitly smaller than the size of the destination. Thus, the NULL > char has to be taken into account on strncpy. > > This will avoid the foll

[PATCH] powerpc/kvm: Fix kvmppc_vcore->in_guest value in kvmhv_switch_to_host

2019-10-03 Thread Jordan Niethe
kvmhv_switch_to_host() in arch/powerpc/kvm/book3s_hv_rmhandlers.S needs to set kvmppc_vcore->in_guest to 0 to signal secondary CPUs to continue. This happens after resetting the PCR. Before commit 13c7bb3c57dc ("powerpc/64s: Set reserved PCR bits"), r0 would always be 0 before it was stored to kvmp

Re: [PATCH] powerpc/kvm: Fix kvmppc_vcore->in_guest value in kvmhv_switch_to_host

2019-10-03 Thread Alistair Popple
Reviewed-by: Alistair Popple On Friday, 4 October 2019 12:53:17 PM AEST Jordan Niethe wrote: > kvmhv_switch_to_host() in arch/powerpc/kvm/book3s_hv_rmhandlers.S needs > to set kvmppc_vcore->in_guest to 0 to signal secondary CPUs to continue. > This happens after resetting the PCR. Before commit 1

Re: [PATCH] powerpc/powernv/prd: Validate whether address to be mapped is part of system RAM

2019-10-03 Thread Jeremy Kerr
Hi Vaidy, The current topic is who owns setting up the ATT bits for that piece of memory. It is the kernel today. Kernel decides to set this up as normal memory or I/O memory and sets the bits in page table entry. Or, what if there's a range of address-space that isn't backed by system RAM (