Re: [PATCH 06/11] lockdep: consolidate the LOCKDEP_SUPPORT symbol

2019-02-14 Thread Greentime Hu
Hi Yamada, Masahiro Yamada 於 2019年2月15日 週五 下午3:17寫道: > > +CC Greentime Hu > +CC Vincent Chen > > > On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig wrote: > > > > Add one definition to lib/Kconfig.debug and let the architectures > > select if it supported. > > > > Signed-off-by: Christoph

Re: [PATCH v2 6/7] powerpc/eeh: Allow disabling recovery

2019-02-14 Thread Sam Bobroff
On Fri, Feb 15, 2019 at 11:48:16AM +1100, Oliver O'Halloran wrote: > Currently when we detect an error we automatically invoke the EEH recovery > handler. This can be annoying when debugging EEH problems, or when working > on EEH itself so this patch adds a debugfs knob that will prevent a >

Re: [PATCH v2 2/7] powerpc/eeh_cache: Add pr_debug() prints for insert/remove

2019-02-14 Thread Sam Bobroff
On Fri, Feb 15, 2019 at 11:48:12AM +1100, Oliver O'Halloran wrote: > The EEH address cache is used to map a physical MMIO address back to a PCI > device. It's useful to know when it's being manipulated, but currently this > requires recompiling with #define DEBUG set. This is pointless since we >

[PATCH] powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

2019-02-14 Thread Michael Ellerman
GCC 8 warns about the logic in vr_get/set(), which with -Werror breaks the build: In function ‘user_regset_copyin’, inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:628:9: include/linux/regset.h:295:4: error: ‘memcpy’ offset [-527, -529] is out of the bounds [0, 16] of object

Re: [PATCH v2 5/7] powerpc/pci: Add pci_find_controller_for_domain()

2019-02-14 Thread Sam Bobroff
On Fri, Feb 15, 2019 at 11:48:15AM +1100, Oliver O'Halloran wrote: > Add a helper to find the pci_controller structure based on the domain > number / phb id. > > Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff > --- > v2: Renamed pci_find_hose_for_domain() to >

Re: [PATCH v2 4/7] powerpc/eeh_cache: Bump log level of eeh_addr_cache_print()

2019-02-14 Thread Sam Bobroff
On Fri, Feb 15, 2019 at 11:48:14AM +1100, Oliver O'Halloran wrote: > To use this function at all #define DEBUG needs to be set in eeh_cache.c. > Considering that printing at pr_debug is probably not all that useful since > it adds the additional hurdle of requiring you to enable the debug print if

Re: [PATCH 06/11] lockdep: consolidate the LOCKDEP_SUPPORT symbol

2019-02-14 Thread Masahiro Yamada
+CC Greentime Hu +CC Vincent Chen On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig wrote: > > Add one definition to lib/Kconfig.debug and let the architectures > select if it supported. > > Signed-off-by: Christoph Hellwig This changes the behavior of nds32. So please leave a note in the

Re: [PATCH v2 3/7] powerpc/eeh_cache: Add a way to dump the EEH address cache

2019-02-14 Thread Sam Bobroff
On Fri, Feb 15, 2019 at 11:48:13AM +1100, Oliver O'Halloran wrote: > Adds a debugfs file that can be read to view the contents of the EEH > address cache. This is pretty similar to the existing > eeh_addr_cache_print() function, but that function is intended to debug > issues inside of the kernel

Re: [PATCH v2 1/7] powerpc/eeh: Use debugfs_create_u32 for eeh_max_freezes

2019-02-14 Thread Sam Bobroff
On Fri, Feb 15, 2019 at 11:48:11AM +1100, Oliver O'Halloran wrote: > There's no need to the custom getter/setter functions so we should remove > them in favour of using the generic one. While we're here, change the type > of eeh_max_freeze to u32 and print the value in decimal rather than > hex

Re: [PATCH 11/11] s390: don't redefined the HAS_IOMEM symbol

2019-02-14 Thread Masahiro Yamada
On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig wrote: > > Rely on the common defintion instead. > > Signed-off-by: Christoph Hellwig > --- > arch/s390/Kconfig | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig > index

Re: [PATCH 05/11] tracing: consolidate the TRACE_IRQFLAGS_SUPPORT symbol

2019-02-14 Thread Masahiro Yamada
+CC: Ley Foon Tan +CC: nios2-...@lists.rocketboards.org On Thu, Feb 14, 2019 at 2:40 AM Christoph Hellwig wrote: > diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig > index 715e6c09b4a5..3b50689007f5 100644 > --- a/arch/nios2/Kconfig > +++ b/arch/nios2/Kconfig > @@ -20,6 +20,7 @@ config

Re: Kernel panic when loading the IDE controller driver

2019-02-14 Thread sgosavi1
> Maybe look around > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/? > id=9a0e77f28b50128df0c9e26ae489e44e29a7270a >Also look at ide_platform.c. I imagine there must be some way to set it >up in your device tree. I have gone through this before and also tried the

Re: [PATCH 10/11] lib: consolidate the GENERIC_HWEIGHT symbol

2019-02-14 Thread Geert Uytterhoeven
On Thu, Feb 14, 2019 at 3:11 AM Christoph Hellwig wrote: > Introduce a new ARCH_HAS_HWEIGHT symbol for alpha and ia64, and just > default to the generic version otherwise. > > Signed-off-by: Christoph Hellwig > arch/m68k/Kconfig | 4 Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s,

Re: [PATCH 01/11] powerpc: remove dead ifdefs in

2019-02-14 Thread Christophe Leroy
Le 13/02/2019 à 18:39, Christoph Hellwig a écrit : __KERNEL__ is never not defined for non-uapi headers, and GENERIC_CSUM isn't ever set for powerpc either. GENERIC_CSUM was abandonned by commit d4fde568a34a ("powerpc/64: Use optimized checksum routines on little-endian") Could you also

Re: [PATCH v4 0/3] locking/rwsem: Rwsem rearchitecture part 0

2019-02-14 Thread Peter Zijlstra
On Wed, Feb 13, 2019 at 05:00:14PM -0500, Waiman Long wrote: > v4: > - Remove rwsem-spinlock.c and make all archs use rwsem-xadd.c. > > v3: > - Optimize __down_read_trylock() for the uncontended case as suggested >by Linus. > > v2: > - Add patch 2 to optimize __down_read_trylock() as

Re: [PATCH v4 2/3] locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs

2019-02-14 Thread Peter Zijlstra
On Thu, Feb 14, 2019 at 11:54:47AM +0100, Geert Uytterhoeven wrote: > On Wed, Feb 13, 2019 at 11:01 PM Waiman Long wrote: > > Currently, we have two different implementation of rwsem: > > 1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c) > > 2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c) >

Re: [PATCH 01/11] powerpc: remove dead ifdefs in

2019-02-14 Thread Andreas Schwab
On Feb 13 2019, Christoph Hellwig wrote: > __KERNEL__ is never not defined for non-uapi headers, and GENERIC_CSUM "... never not ... non-..." That's a bit too negative, I think. :-) Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748

Re: [PATCH v4 2/3] locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs

2019-02-14 Thread Geert Uytterhoeven
On Wed, Feb 13, 2019 at 11:01 PM Waiman Long wrote: > Currently, we have two different implementation of rwsem: > 1) CONFIG_RWSEM_GENERIC_SPINLOCK (rwsem-spinlock.c) > 2) CONFIG_RWSEM_XCHGADD_ALGORITHM (rwsem-xadd.c) > > As we are going to use a single generic implementation for rwsem-xadd.c >

Re: [PATCH 03/11] kernel/locks: consolidate RWSEM_GENERIC_* options

2019-02-14 Thread Geert Uytterhoeven
On Thu, Feb 14, 2019 at 12:08 AM Christoph Hellwig wrote: > Introduce one central definition of RWSEM_XCHGADD_ALGORITHM and > RWSEM_GENERIC_SPINLOCK in kernel/Kconfig.locks and let architectures > select RWSEM_XCHGADD_ALGORITHM if they want it, otherwise default to > the spinlock version. > >

Re: [PATCH v3 2/2] locking/rwsem: Optimize down_read_trylock()

2019-02-14 Thread Peter Zijlstra
On Wed, Feb 13, 2019 at 03:32:12PM -0500, Waiman Long wrote: > Modify __down_read_trylock() to optimize for an unlocked rwsem and make > it generate slightly better code. > > Before this patch, down_read_trylock: > >0x <+0>: callq 0x5 >0x0005 <+5>:

Re: [PATCH v2] hugetlb: allow to free gigantic pages regardless of the configuration

2019-02-14 Thread Alexandre Ghiti
On 02/13/2019 08:30 PM, Dave Hansen wrote: -#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) +#ifdef CONFIG_COMPACTION_CORE static __init int gigantic_pages_init(void) { /* With compaction or CMA we can allocate gigantic pages at runtime

Re: [PATCH 07/11] init: consolidate the GENERIC_CALIBRATE_DELAY symbol

2019-02-14 Thread Geert Uytterhoeven
On Thu, Feb 14, 2019 at 3:25 AM Christoph Hellwig wrote: > Add one definition to init/Kconfig and let the architectures select it > if supported. The only complication is xtensa, where it is a user > visible option - we introduce a xtensa-specific symbol instead to work > around this. > >

Re: [PATCH 09/11] lib: consolidate the GENERIC_CSUM symbol

2019-02-14 Thread Geert Uytterhoeven
On Thu, Feb 14, 2019 at 3:25 AM Christoph Hellwig wrote: > Add one definition to lib/Kconfig and let the architectures > select if it supported. > > Signed-off-by: Christoph Hellwig > arch/m68k/Kconfig | 3 --- Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s,

Re: [PATCH v2] hugetlb: allow to free gigantic pages regardless of the configuration

2019-02-14 Thread Vlastimil Babka
On 2/13/19 8:30 PM, Dave Hansen wrote: >> -#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || >> defined(CONFIG_CMA) >> +#ifdef CONFIG_COMPACTION_CORE >> static __init int gigantic_pages_init(void) >> { >> /* With compaction or CMA we can allocate gigantic pages at

Re: [PATCH 03/11] kernel/locks: consolidate RWSEM_GENERIC_* options

2019-02-14 Thread Geert Uytterhoeven
On Thu, Feb 14, 2019 at 12:08 AM Christoph Hellwig wrote: > Introduce one central definition of RWSEM_XCHGADD_ALGORITHM and > RWSEM_GENERIC_SPINLOCK in kernel/Kconfig.locks and let architectures > select RWSEM_XCHGADD_ALGORITHM if they want it, otherwise default to > the spinlock version. > >

Re: [PATCH v2] hugetlb: allow to free gigantic pages regardless of the configuration

2019-02-14 Thread Alexandre Ghiti
On 02/14/2019 10:52 AM, Vlastimil Babka wrote: On 2/13/19 8:30 PM, Dave Hansen wrote: -#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) +#ifdef CONFIG_COMPACTION_CORE static __init int gigantic_pages_init(void) { /* With compaction or CMA

Re: [v3, 1/2] drivers/mtd: Use mtd->name when registering nvmem device

2019-02-14 Thread Boris Brezillon
From: Boris Brezillon On Mon, 2019-02-11 at 13:33:37 UTC, "Aneesh Kumar K.V" wrote: > With this patch, we use the mtd->name instead of concatenating the name with > '0' > > Fixes: c4dfa25ab307 ("mtd: add support for reading MTD devices via the nvmem > API") > Signed-off-by: Aneesh Kumar K.V

Re: [v3,2/2] drivers/mtd: Fix device registration error

2019-02-14 Thread Boris Brezillon
From: Boris Brezillon On Mon, 2019-02-11 at 13:33:38 UTC, "Aneesh Kumar K.V" wrote: > This change helps me to get multiple mtd device registered. Without this > I get > > sysfs: cannot create duplicate filename '/bus/nvmem/devices/flash0' > CPU: 0 PID: 1 Comm: swapper/0 Not tainted

Re: [PATCH-tip 00/22] locking/rwsem: Rework rwsem-xadd & enable new rwsem features

2019-02-14 Thread Davidlohr Bueso
On Fri, 08 Feb 2019, Waiman Long wrote: I am planning to run more performance test and post the data sometimes next week. Davidlohr is also going to run some of his rwsem performance test on this patchset. So I ran this series on a 40-core IB 2 socket with various worklods in mmtests. Below

Re: [PATCH 03/11] kernel/locks: consolidate RWSEM_GENERIC_* options

2019-02-14 Thread Waiman Long
On 02/14/2019 05:52 AM, Geert Uytterhoeven wrote: > On Thu, Feb 14, 2019 at 12:08 AM Christoph Hellwig wrote: >> Introduce one central definition of RWSEM_XCHGADD_ALGORITHM and >> RWSEM_GENERIC_SPINLOCK in kernel/Kconfig.locks and let architectures >> select RWSEM_XCHGADD_ALGORITHM if they want

Re: [PATCH-tip 00/22] locking/rwsem: Rework rwsem-xadd & enable new rwsem features

2019-02-14 Thread Waiman Long
On 02/14/2019 08:23 AM, Davidlohr Bueso wrote: > On Fri, 08 Feb 2019, Waiman Long wrote: >> I am planning to run more performance test and post the data sometimes >> next week. Davidlohr is also going to run some of his rwsem performance >> test on this patchset. > > So I ran this series on a

Re: [PATCH V2 3/10] KVM/MMU: Add last_level in the struct mmu_spte_page

2019-02-14 Thread Paolo Bonzini
On 02/02/19 02:38, lantianyu1...@gmail.com wrote: > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index ce770b446238..70cafd3f95ab 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -2918,6 +2918,9 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep, > > if

Re: [PATCH V2 3/10] KVM/MMU: Add last_level in the struct mmu_spte_page

2019-02-14 Thread Paolo Bonzini
On 02/02/19 02:38, lantianyu1...@gmail.com wrote: > diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c > index ce770b446238..70cafd3f95ab 100644 > --- a/arch/x86/kvm/mmu.c > +++ b/arch/x86/kvm/mmu.c > @@ -2918,6 +2918,9 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep, > > if

Re: [PATCH v3 2/2] locking/rwsem: Optimize down_read_trylock()

2019-02-14 Thread Waiman Long
On 02/14/2019 05:33 AM, Peter Zijlstra wrote: > On Wed, Feb 13, 2019 at 03:32:12PM -0500, Waiman Long wrote: >> Modify __down_read_trylock() to optimize for an unlocked rwsem and make >> it generate slightly better code. >> >> Before this patch, down_read_trylock: >> >>0x <+0>:

[PATCH v04] powerpc/numa: Perform full re-add of CPU for PRRN/VPHN topology update

2019-02-14 Thread Michael Bringmann
To: linuxppc-dev@lists.ozlabs.org To: linux-ker...@vger.kernel.org Benjamin Herrenschmidt Paul Mackerras Michael Ellerman Nathan Lynch Corentin Labbe Tyrel Datwyler Srikar Dronamraju Guenter Roeck Michael Bringmann "Oliver O'Halloran" Russell Currey Haren Myneni Al Viro Kees Cook

Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present()

2019-02-14 Thread Jan Kara
On Thu 14-02-19 17:23:39, Michael Ellerman wrote: > In v4.20 we changed our pgd/pud_present() to check for _PAGE_PRESENT > rather than just checking that the value is non-zero, e.g.: > > static inline int pgd_present(pgd_t pgd) > { > - return !pgd_none(pgd); > + return

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-14 Thread Ira Weiny
On Wed, Feb 13, 2019 at 11:00:06PM -0700, Jason Gunthorpe wrote: > On Wed, Feb 13, 2019 at 05:53:14PM -0800, Ira Weiny wrote: > > On Mon, Feb 11, 2019 at 03:54:47PM -0700, Jason Gunthorpe wrote: > > > On Mon, Feb 11, 2019 at 05:44:32PM -0500, Daniel Jordan wrote: > > > > > > > All five of these

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-14 Thread Jason Gunthorpe
On Thu, Feb 14, 2019 at 11:33:53AM -0800, Ira Weiny wrote: > > I think it had to do with double accounting pinned and mlocked pages > > and thus delivering a lower than expected limit to userspace. > > > > vfio has this bug, RDMA does not. RDMA has a bug where it can > > overallocate locked

Re: [PATCH v3 2/2] locking/rwsem: Optimize down_read_trylock()

2019-02-14 Thread Waiman Long
On 02/14/2019 01:02 PM, Will Deacon wrote: > On Thu, Feb 14, 2019 at 11:33:33AM +0100, Peter Zijlstra wrote: >> On Wed, Feb 13, 2019 at 03:32:12PM -0500, Waiman Long wrote: >>> Modify __down_read_trylock() to optimize for an unlocked rwsem and make >>> it generate slightly better code. >>> >>>

[PATCH v3] hugetlb: allow to free gigantic pages regardless of the configuration

2019-02-14 Thread Alexandre Ghiti
On systems without CMA or (MEMORY_ISOLATION && COMPACTION) activated but that support gigantic pages, boottime reserved gigantic pages can not be freed at all. This patch simply enables the possibility to hand back those pages to memory allocator. This patch also renames: - the triplet CMA or

Re: [Bug 202149] New: NULL Pointer Dereference in __split_huge_pmd on PPC64LE

2019-02-14 Thread Matt Corallo
Hey, sorry for the delay on this. I had some apparently-unrelated hangs that I believe were due to mpt3sas instability, and at the risk of speaking too soon for a bug I couldn't reliably reproduce, this patch appears to have resolved it, thanks! > On Jan 21, 2019, at 07:35, Aneesh Kumar K.V

Re: [PATCH 15/19] KVM: PPC: Book3S HV: add get/set accessors for the source configuration

2019-02-14 Thread Cédric Le Goater
On 2/8/19 6:15 AM, David Gibson wrote: > On Thu, Feb 07, 2019 at 10:13:48AM +0100, Cédric Le Goater wrote: >> On 2/7/19 3:48 AM, David Gibson wrote: >>> On Wed, Feb 06, 2019 at 08:07:36AM +0100, Cédric Le Goater wrote: On 2/6/19 2:24 AM, David Gibson wrote: > On Wed, Feb 06, 2019 at

Re: [PATCH 03/11] kernel/locks: consolidate RWSEM_GENERIC_* options

2019-02-14 Thread Waiman Long
On 02/14/2019 12:04 PM, Christoph Hellwig wrote: > On Thu, Feb 14, 2019 at 10:26:52AM -0500, Waiman Long wrote: >> Would you mind dropping just patch 3 from your series? > Sure, we can just drop this patch. Thanks, Longman

Re: [PATCH V2 00/10] X86/KVM/Hyper-V: Add HV ept tlb range list flush support in KVM

2019-02-14 Thread Paolo Bonzini
On 02/02/19 02:38, lantianyu1...@gmail.com wrote: > From: Lan Tianyu > > This patchset is to introduce hv ept tlb range list flush function > support in the KVM MMU component. Flushing ept tlbs of several address > range can be done via single hypercall and new list flush function is > used in

Re: [PATCH 03/11] kernel/locks: consolidate RWSEM_GENERIC_* options

2019-02-14 Thread Christoph Hellwig
On Thu, Feb 14, 2019 at 10:26:52AM -0500, Waiman Long wrote: > Would you mind dropping just patch 3 from your series? Sure, we can just drop this patch.

Re: [PATCH 01/11] powerpc: remove dead ifdefs in

2019-02-14 Thread Christoph Hellwig
On Thu, Feb 14, 2019 at 09:26:19AM +0100, Christophe Leroy wrote: > Could you also remove the 'config GENERIC_CSUM' item in > arch/powerpc/Kconfig ? All the separate declarations go away later in this series.

Re: Kernel panic when loading the IDE controller driver

2019-02-14 Thread Michal Suchánek
On Thu, 14 Feb 2019 01:17:11 -0700 (MST) sgosavi1 wrote: > > Maybe look around > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/? > > id=9a0e77f28b50128df0c9e26ae489e44e29a7270a > > >Also look at ide_platform.c. I imagine there must be some way to set it > >up in

Re: Kernel panic when loading the IDE controller driver

2019-02-14 Thread Christophe Leroy
Le 13/02/2019 à 16:27, Christophe Leroy a écrit : Le 13/02/2019 à 13:53, sgosavi1 a écrit : Why using 4.15.13 which is obsolete instead of using one of the Long Term Support versions which are still maintained, like 4.14 or 4.19 ? (see the complete list at

Re: [PATCH v3 2/2] locking/rwsem: Optimize down_read_trylock()

2019-02-14 Thread Linus Torvalds
On Thu, Feb 14, 2019 at 6:53 AM Waiman Long wrote: > > The ARM64 result is what I would have expected given that the change was > to optimize for the uncontended case. The x86-64 result is kind of an > anomaly to me, but I haven't bothered to dig into that. I would say that the ARM result is

Re: [PATCH v3 2/2] locking/rwsem: Optimize down_read_trylock()

2019-02-14 Thread Will Deacon
On Thu, Feb 14, 2019 at 11:33:33AM +0100, Peter Zijlstra wrote: > On Wed, Feb 13, 2019 at 03:32:12PM -0500, Waiman Long wrote: > > Modify __down_read_trylock() to optimize for an unlocked rwsem and make > > it generate slightly better code. > > > > Before this patch, down_read_trylock: > > > >

Re: [PATCH v3 2/2] locking/rwsem: Optimize down_read_trylock()

2019-02-14 Thread Linus Torvalds
On Thu, Feb 14, 2019 at 9:51 AM Linus Torvalds wrote: > > The arm64 numbers scaled horribly even before, and that's because > there is too much ping-pong, and it's probably because there is no > "stickiness" to the cacheline to the core, and thus adding the extra > loop can make the ping-pong

Re: [PATCH v5 3/3] powerpc/32: Add KASAN support

2019-02-14 Thread Daniel Axtens
Hi Christophe, > --- a/arch/powerpc/include/asm/string.h > +++ b/arch/powerpc/include/asm/string.h > @@ -27,6 +27,20 @@ extern int memcmp(const void *,const void > *,__kernel_size_t); > extern void * memchr(const void *,int,__kernel_size_t); > extern void * memcpy_flushcache(void *,const void

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-14 Thread Ira Weiny
On Thu, Feb 14, 2019 at 01:12:31PM -0700, Jason Gunthorpe wrote: > On Thu, Feb 14, 2019 at 11:33:53AM -0800, Ira Weiny wrote: > > > > I think it had to do with double accounting pinned and mlocked pages > > > and thus delivering a lower than expected limit to userspace. > > > > > > vfio has this

Re: [PATCH v4 0/3] locking/rwsem: Rwsem rearchitecture part 0

2019-02-14 Thread Waiman Long
On 02/14/2019 05:37 AM, Peter Zijlstra wrote: > On Wed, Feb 13, 2019 at 05:00:14PM -0500, Waiman Long wrote: >> v4: >> - Remove rwsem-spinlock.c and make all archs use rwsem-xadd.c. >> >> v3: >> - Optimize __down_read_trylock() for the uncontended case as suggested >>by Linus. >> >> v2: >>

Re: [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

2019-02-14 Thread Jason Gunthorpe
On Thu, Feb 14, 2019 at 01:46:51PM -0800, Ira Weiny wrote: > > > > Really unclear how to fix this. The pinned/locked split with two > > > > buckets may be the right way. > > > > > > Are you suggesting that we have 2 user limits? > > > > This is what RDMA has done since CL's patch. > > I don't

[PATCH 08/43] perf vendor events power9: Cpi_breakdown & estimated_dcache_miss_cpi metrics

2019-02-14 Thread Arnaldo Carvalho de Melo
From: Paul Clarke Descriptions of metrics for POWER9 processors can be found in the "POWER9 Performance Monitor Unit User’s Guide", which is currently available on the "IBM Portal for OpenPOWER" (https://www-355.ibm.com/systems/power/openpower/welcome.xhtml) at

[PATCH 09/43] perf vendor events power9: Dl1_reloads, instruction_misses, l[23]_stats & pteg_reloads metrics

2019-02-14 Thread Arnaldo Carvalho de Melo
From: Paul Clarke Descriptions of metrics for POWER9 processors can be found in the "POWER9 Performance Monitor Unit User’s Guide", which is currently available on the "IBM Portal for OpenPOWER" (https://www-355.ibm.com/systems/power/openpower/welcome.xhtml) at

[PATCH 10/43] perf vendor events power9: Branch_prediction, instruction_stats, latency, lsu_rejects, memory, prefetch & translation metrics

2019-02-14 Thread Arnaldo Carvalho de Melo
From: Paul Clarke Descriptions of metrics for POWER9 processors can be found in the "POWER9 Performance Monitor Unit User’s Guide", which is currently available on the "IBM Portal for OpenPOWER" (https://www-355.ibm.com/systems/power/openpower/welcome.xhtml) at

[PATCH 11/43] perf vendor events power9: General metrics

2019-02-14 Thread Arnaldo Carvalho de Melo
From: Paul Clarke Descriptions of metrics for POWER9 processors can be found in the "POWER9 Performance Monitor Unit User’s Guide", which is currently available on the "IBM Portal for OpenPOWER" (https://www-355.ibm.com/systems/power/openpower/welcome.xhtml) at

[PATCH v2 1/7] powerpc/eeh: Use debugfs_create_u32 for eeh_max_freezes

2019-02-14 Thread Oliver O'Halloran
There's no need to the custom getter/setter functions so we should remove them in favour of using the generic one. While we're here, change the type of eeh_max_freeze to u32 and print the value in decimal rather than hex because printing it in hex makes no sense. Signed-off-by: Oliver O'Halloran

Re: [PATCH 1/1] powerpc/64: Adjust order in pcibios_init()

2019-02-14 Thread Oliver
On Thu, Feb 14, 2019 at 4:14 PM Sam Bobroff wrote: > > The pcibios_init() function for 64 bit PowerPC currently calls > pci_bus_add_devices() before pcibios_resource_survey(), which seems > incorrect because it adds devices and attempts to bind their drivers > before allocating their resources

[PATCH v2 3/7] powerpc/eeh_cache: Add a way to dump the EEH address cache

2019-02-14 Thread Oliver O'Halloran
Adds a debugfs file that can be read to view the contents of the EEH address cache. This is pretty similar to the existing eeh_addr_cache_print() function, but that function is intended to debug issues inside of the kernel since it's #ifdef`ed out by default, and writes into the kernel log.

[PATCH v2 2/7] powerpc/eeh_cache: Add pr_debug() prints for insert/remove

2019-02-14 Thread Oliver O'Halloran
The EEH address cache is used to map a physical MMIO address back to a PCI device. It's useful to know when it's being manipulated, but currently this requires recompiling with #define DEBUG set. This is pointless since we have dynamic_debug nowdays, so remove the #ifdef guard and add a pr_debug()

[PATCH v2 4/7] powerpc/eeh_cache: Bump log level of eeh_addr_cache_print()

2019-02-14 Thread Oliver O'Halloran
To use this function at all #define DEBUG needs to be set in eeh_cache.c. Considering that printing at pr_debug is probably not all that useful since it adds the additional hurdle of requiring you to enable the debug print if dynamic_debug is in use so this patch bumps it to pr_info.

[PATCH v2 5/7] powerpc/pci: Add pci_find_controller_for_domain()

2019-02-14 Thread Oliver O'Halloran
Add a helper to find the pci_controller structure based on the domain number / phb id. Signed-off-by: Oliver O'Halloran --- v2: Renamed pci_find_hose_for_domain() to pci_find_controller_for_domain() --- arch/powerpc/include/asm/pci-bridge.h | 2 ++ arch/powerpc/kernel/pci-common.c |

[PATCH v2 6/7] powerpc/eeh: Allow disabling recovery

2019-02-14 Thread Oliver O'Halloran
Currently when we detect an error we automatically invoke the EEH recovery handler. This can be annoying when debugging EEH problems, or when working on EEH itself so this patch adds a debugfs knob that will prevent a recovery event from being queued up when an issue is detected. Signed-off-by:

[PATCH v2 7/7] powerpc/eeh: Add eeh_force_recover to debugfs

2019-02-14 Thread Oliver O'Halloran
This patch adds a debugfs interface to force scheduling a recovery event. This can be used to recover a specific PE or schedule a "special" recovery even that checks for errors at the PHB level. To force a recovery of a normal PE, use: echo '<#pe>:<#phb>' >

[PATCH AUTOSEL 4.20 25/77] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-02-14 Thread Sasha Levin
From: Silvio Cesare [ Upstream commit c407cd008fd039320d147088b52d0fa34ed3ddcb ] Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more

[PATCH AUTOSEL 4.20 69/77] ibmveth: Do not process frames after calling napi_reschedule

2019-02-14 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit e95d22c69b2c130ccce257b84daf283fd82d611e ] The IBM virtual ethernet driver's polling function continues to process frames after rescheduling NAPI, resulting in a warning if it exhausted its budget. Do not restart polling after calling napi_reschedule.

[PATCH AUTOSEL 4.19 18/65] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-02-14 Thread Sasha Levin
From: Silvio Cesare [ Upstream commit c407cd008fd039320d147088b52d0fa34ed3ddcb ] Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more

[PATCH AUTOSEL 4.19 58/65] ibmveth: Do not process frames after calling napi_reschedule

2019-02-14 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit e95d22c69b2c130ccce257b84daf283fd82d611e ] The IBM virtual ethernet driver's polling function continues to process frames after rescheduling NAPI, resulting in a warning if it exhausted its budget. Do not restart polling after calling napi_reschedule.

[PATCH AUTOSEL 4.14 12/40] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-02-14 Thread Sasha Levin
From: Silvio Cesare [ Upstream commit c407cd008fd039320d147088b52d0fa34ed3ddcb ] Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more

[PATCH AUTOSEL 4.14 35/40] ibmveth: Do not process frames after calling napi_reschedule

2019-02-14 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit e95d22c69b2c130ccce257b84daf283fd82d611e ] The IBM virtual ethernet driver's polling function continues to process frames after rescheduling NAPI, resulting in a warning if it exhausted its budget. Do not restart polling after calling napi_reschedule.

[PATCH AUTOSEL 4.9 09/27] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-02-14 Thread Sasha Levin
From: Silvio Cesare [ Upstream commit c407cd008fd039320d147088b52d0fa34ed3ddcb ] Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more

[PATCH AUTOSEL 4.9 22/27] ibmveth: Do not process frames after calling napi_reschedule

2019-02-14 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit e95d22c69b2c130ccce257b84daf283fd82d611e ] The IBM virtual ethernet driver's polling function continues to process frames after rescheduling NAPI, resulting in a warning if it exhausted its budget. Do not restart polling after calling napi_reschedule.

[PATCH AUTOSEL 4.4 08/20] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-02-14 Thread Sasha Levin
From: Silvio Cesare [ Upstream commit c407cd008fd039320d147088b52d0fa34ed3ddcb ] Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more

[PATCH AUTOSEL 4.4 17/20] ibmveth: Do not process frames after calling napi_reschedule

2019-02-14 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit e95d22c69b2c130ccce257b84daf283fd82d611e ] The IBM virtual ethernet driver's polling function continues to process frames after rescheduling NAPI, resulting in a warning if it exhausted its budget. Do not restart polling after calling napi_reschedule.

[PATCH AUTOSEL 3.18 06/16] ASoC: imx-audmux: change snprintf to scnprintf for possible overflow

2019-02-14 Thread Sasha Levin
From: Silvio Cesare [ Upstream commit c407cd008fd039320d147088b52d0fa34ed3ddcb ] Change snprintf to scnprintf. There are generally two cases where using snprintf causes problems. 1) Uses of size += snprintf(buf, SIZE - size, fmt, ...) In this case, if snprintf would have written more

[PATCH AUTOSEL 3.18 13/16] ibmveth: Do not process frames after calling napi_reschedule

2019-02-14 Thread Sasha Levin
From: Thomas Falcon [ Upstream commit e95d22c69b2c130ccce257b84daf283fd82d611e ] The IBM virtual ethernet driver's polling function continues to process frames after rescheduling NAPI, resulting in a warning if it exhausted its budget. Do not restart polling after calling napi_reschedule.

Re: [Bug 202149] New: NULL Pointer Dereference in __split_huge_pmd on PPC64LE

2019-02-14 Thread Michael Ellerman
Matt Corallo writes: > Hey, sorry for the delay on this. I had some apparently-unrelated > hangs that I believe were due to mpt3sas instability, and at the risk > of speaking too soon for a bug I couldn't reliably reproduce, this > patch appears to have resolved it, thanks! Thanks. For the

[PATCH] KVM: PPC: Book3S: Add KVM stat num_[2M/1G]_pages

2019-02-14 Thread Suraj Jitindar Singh
This adds an entry to the kvm_stats_debugfs directory which provides the number of large (2M or 1G) pages which have been used to setup the guest mappings. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/include/asm/kvm_host.h| 2 ++ arch/powerpc/kvm/book3s.c | 3 +++

[RFC PATCH 0/5] powerpc: KASAN for 64-bit Book3E

2019-02-14 Thread Daniel Axtens
Building on the work of Christophe, Aneesh and Balbir, I've ported KASAN to the e6500, a 64-bit Book3E processor which doesn't have a hashed page table. It applies on top of Christophe's series, v5. It requires some changes to the KASAN core - please let me know if these are problematic and we

[RFC PATCH 3/5] kasan: allow architectures to provide an outline readiness check

2019-02-14 Thread Daniel Axtens
In powerpc (as I understand it), we spend a lot of time in boot running in real mode before MMU paging is initalised. During this time we call a lot of generic code, including printk(). If we try to access the shadow region during this time, things fail. My attempts to move early init before the

[RFC PATCH 5/5] powerpc: KASAN for 64bit Book3E

2019-02-14 Thread Daniel Axtens
Wire up KASAN. Only outline instrumentation is supported. The KASAN shadow area is mapped into vmemmap space: 0x8000 0400 to 0x8000 0600 . To do this we require that vmemmap be disabled. (This is the default in the kernel config that QorIQ provides for the machine in their SDK

[RFC PATCH 1/5] kasan: do not open-code addr_has_shadow

2019-02-14 Thread Daniel Axtens
We have a couple of places checking for the existence of a shadow mapping for an address by open-coding the inverse of the check in addr_has_shadow. Replace the open-coded versions with the helper. This will be needed in future to allow architectures to override the layout of the shadow mapping.

[RFC PATCH 2/5] kasan: allow architectures to manage the memory-to-shadow mapping

2019-02-14 Thread Daniel Axtens
Currently, shadow addresses are always addr >> shift + offset. However, for powerpc, the virtual address space is fragmented in ways that make this simple scheme impractical. Allow architectures to override: - kasan_shadow_to_mem - kasan_mem_to_shadow - addr_has_shadow Rename addr_has_shadow

[RFC PATCH 4/5] powerpc: move KASAN into its own subdirectory

2019-02-14 Thread Daniel Axtens
In preparation for adding ppc64 implementations, break out the code into its own subdirectory. Signed-off-by: Daniel Axtens --- arch/powerpc/mm/Makefile| 4 +--- arch/powerpc/mm/kasan/Makefile | 5 + arch/powerpc/mm/{kasan_init.c =>

Re: [RFC PATCH 1/5] kasan: do not open-code addr_has_shadow

2019-02-14 Thread Andrew Donnellan
On 15/2/19 11:04 am, Daniel Axtens wrote: We have a couple of places checking for the existence of a shadow mapping for an address by open-coding the inverse of the check in addr_has_shadow. Replace the open-coded versions with the helper. This will be needed in future to allow architectures to

Re: [RFC PATCH 4/5] powerpc: move KASAN into its own subdirectory

2019-02-14 Thread Andrew Donnellan
On 15/2/19 11:04 am, Daniel Axtens wrote: In preparation for adding ppc64 implementations, break out the code into its own subdirectory. Signed-off-by: Daniel Axtens If Christophe respins his series, can we squash this in there? --- arch/powerpc/mm/Makefile