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

2017-08-20 Thread Sergey Senozhatsky
On (08/18/17 00:05), Laurent Dufour wrote: [..] > + /* > + * MPOL_INTERLEAVE implies additional check in mpol_misplaced() which > + * are not compatible with the speculative page fault processing. > + */ > + pol = __get_vma_policy(vma, address); > + if (!pol) > +

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-20 Thread Nicholas Piggin
On Sun, 20 Aug 2017 14:45:53 +1000 Nicholas Piggin wrote: > On Wed, 16 Aug 2017 09:27:31 -0700 > "Paul E. McKenney" wrote: > > On Wed, Aug 16, 2017 at 05:56:17AM -0700, Paul E. McKenney wrote: > > > > Thomas, John, am I misinterpreting the timer trace event messages? > > So I did some diggin

[PATCH 1/2] soc/fsl/qe: Fix a potential NULL pointer dereference in an error handling path

2017-08-20 Thread Christophe JAILLET
If 'of_find_device_by_node()' fails at line 153, a NULL pointer dereference (pdev) will occur in the error handling path. Just remove the 'devm_iounmap()' call from the error handling path. The corresponding is managed, there is no need to release explicitly here. Fixes: 35ef1c20fdb2 ("fsl/qe: Ad

[PATCH 2/2] soc/fsl/qe: Slighly simplify code

2017-08-20 Thread Christophe JAILLET
Return 0 instead of 'ret' (which is 0 at this point) to make the code more explicit. Also avoid a useless initialization of 'ret'. Signed-off-by: Christophe JAILLET --- drivers/soc/fsl/qe/qe_tdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_tdm.c

[PATCH] video: fbdev: annotate fb_fix_screeninfo with const and __initconst

2017-08-20 Thread Bhumika Goyal
Make these const as they are only used during a copy operation. Some structures are used as a copy operation inside __init functions, so make them const and replace __initdata with __initconst to avoid section conflict error. Signed-off-by: Bhumika Goyal --- drivers/video/fbdev/68328fb.c | 2

[PATCH v10 00/14] powerpc: "paca->soft_enabled" based local atomic operation implementation

2017-08-20 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of the patchs

[PATCH v10 01/14] powerpc: Add #defs for paca->soft_enabled flags

2017-08-20 Thread Madhavan Srinivasan
Two #defs IRQ_ENABLED and IRQ_DISABLED are added to be used when updating paca->soft_enabled. Replace the hardcoded values used when updating paca->soft_enabled with IRQ_[EN/DIS]ABLED #def. No logic change. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include

[PATCH v10 02/14] powerpc: move set_soft_enabled() and rename

2017-08-20 Thread Madhavan Srinivasan
Move set_soft_enabled() from powerpc/kernel/irq.c to asm/hw_irq.c, to force updates to paca-soft_enabled done via these access function. Add "memory" clobber to hint compiler since paca->soft_enabled memory is the target here Renaming it as soft_enabled_set() will make namespaces works better as p

[PATCH v10 04/14] powerpc: implement arch_local_* using the soft_enabled_* wrappers.

2017-08-20 Thread Madhavan Srinivasan
Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index 3efb0b2ec053..

[PATCH v10 05/14] powerpc/irq: Cleanup hard_irq_disable() macro

2017-08-20 Thread Madhavan Srinivasan
Minor cleanup to use helper function for manipulating paca->soft_enabled variable. Suggested-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h

[PATCH v10 06/14] powerpc/irq: Fix arch_local_irq_disable() in book3s

2017-08-20 Thread Madhavan Srinivasan
In powerpc book3s, arch_local_irq_disable() function is not a "void" when compared to other arch. And only user for this function is arch_local_irq_save(). Patch modify the arch_local_irq_save() and makes arch_local_irq_disable() to use arch_local_irq_save() instead. Suggested-by: Nicholas Piggin

[PATCH v10 07/14] powerpc: Change from enable flag to disable bitmask

2017-08-20 Thread Madhavan Srinivasan
"paca->soft_enabled" is used as a flag to mask some of interrupts. Currently supported flags values and their details: soft_enabledMSR[EE] 0 0 Disabled (PMI and HMI not masked) 1 1 Enabled "paca->soft_enabled" is initialized to 1 to make the interripts

[PATCH v10 09/14] powerpc: Avoid using EXCEPTION_PROLOG_1 macro in MASKABLE_*

2017-08-20 Thread Madhavan Srinivasan
Currently we use both EXCEPTION_PROLOG_1 and __EXCEPTION_PROLOG_1 in the MASKABLE_* macros. As a cleanup, this patch makes MASKABLE_* to use only __EXCEPTION_PROLOG_1. There is not logic change. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/excepti

[PATCH v10 08/14] powerpc: Rename soft_enabled to soft_disable_mask

2017-08-20 Thread Madhavan Srinivasan
Rename the paca->soft_enabled to paca->soft_disable_mask as it is no more used as a flag for interrupt state. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 22 +++--- arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powe

[PATCH v10 10/14] powerpc: Add support to take additional parameter in MASKABLE_* macro

2017-08-20 Thread Madhavan Srinivasan
To support addition of "bitmask" to MASKABLE_* macros, factor out the EXCPETION_PROLOG_1 macro. Make it explicit the interrupt masking supported by a gievn interrupt handler. Patch correspondingly extends the MASKABLE_* macros with an addition's parameter. "bitmask" parameter is passed to SOFTEN_T

[PATCH v10 11/14] powerpc: Add support to mask perf interrupts and replay them

2017-08-20 Thread Madhavan Srinivasan
Two new bit mask field "IRQ_DISABLE_MASK_PMU" is introduced to support the masking of PMI and "IRQ_DISABLE_MASK_ALL" to aid interrupt masking checking. Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added to use in the exception code to check for PMI interrupts. In the masked_int

[PATCH v10 12/14] powerpc:Add new kconfig IRQ_DEBUG_SUPPORT

2017-08-20 Thread Madhavan Srinivasan
New Kconfig is added "CONFIG_IRQ_DEBUG_SUPPORT" to add warn_on to alert the invalid transitions. Also moved the code under the CONFIG_TRACE_IRQFLAGS in arch_local_irq_restore() to new Kconfig. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/Kconfig | 4

[PATCH v10 13/14] powerpc: Add new set of soft_disable_mask_ functions

2017-08-20 Thread Madhavan Srinivasan
To support disabling and enabling of irq with PMI, set of new powerpc_local_irq_pmu_save() and powerpc_local_irq_restore() functions are added. And powerpc_local_irq_save() implemented, by adding a new soft_disable_mask manipulation function soft_disable_mask_or_return(). Local_irq_pmu_* macros are

[PATCH v10 14/14] powerpc: rewrite local_t using soft_irq

2017-08-20 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of this patch

[PATCH v10 03/14] powerpc: Use soft_enabled_set api to update paca->soft_enabled

2017-08-20 Thread Madhavan Srinivasan
Force use of soft_enabled_set() wrapper to update paca-soft_enabled wherever possisble. Also add a new wrapper function, soft_enabled_set_return(), added to force the paca->soft_enabled updates. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-20 Thread Paul E. McKenney
On Sun, Aug 20, 2017 at 11:00:40PM +1000, Nicholas Piggin wrote: > On Sun, 20 Aug 2017 14:45:53 +1000 > Nicholas Piggin wrote: > > > On Wed, 16 Aug 2017 09:27:31 -0700 > > "Paul E. McKenney" wrote: > > > On Wed, Aug 16, 2017 at 05:56:17AM -0700, Paul E. McKenney wrote: > > > > > > Thomas, John,

Re: [PATCH v2 1/1] Split VGA default device handler out of VGA arbiter

2017-08-20 Thread Benjamin Herrenschmidt
On Sat, 2017-08-19 at 10:47 -0500, Bjorn Helgaas wrote: > So if ARM64 doesn't have these PCI legacy resources, does that mean an > ARM64 host bridge cannot generate these legacy addresses on PCI? That > is, there's no host bridge window that maps to those PCI addresses? > That seems like a curious

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-20 Thread Paul E. McKenney
On Sun, Aug 20, 2017 at 11:35:14AM -0700, Paul E. McKenney wrote: > On Sun, Aug 20, 2017 at 11:00:40PM +1000, Nicholas Piggin wrote: > > On Sun, 20 Aug 2017 14:45:53 +1000 > > Nicholas Piggin wrote: > > > > > On Wed, 16 Aug 2017 09:27:31 -0700 > > > "Paul E. McKenney" wrote: > > > > On Wed, Aug

Re: [PATCH v2 1/1] Split VGA default device handler out of VGA arbiter

2017-08-20 Thread Bjorn Helgaas
On Sun, Aug 20, 2017 at 12:08:20PM -0700, Benjamin Herrenschmidt wrote: > On Sat, 2017-08-19 at 10:47 -0500, Bjorn Helgaas wrote: > > So if ARM64 doesn't have these PCI legacy resources, does that mean an > > ARM64 host bridge cannot generate these legacy addresses on PCI? That > > is, there's no

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-20 Thread Nicholas Piggin
On Sun, 20 Aug 2017 14:14:29 -0700 "Paul E. McKenney" wrote: > On Sun, Aug 20, 2017 at 11:35:14AM -0700, Paul E. McKenney wrote: > > On Sun, Aug 20, 2017 at 11:00:40PM +1000, Nicholas Piggin wrote: > > > On Sun, 20 Aug 2017 14:45:53 +1000 > > > Nicholas Piggin wrote: > > > > > > > On Wed, 1

Re: [PATCH v2 00/20] Speculative page faults

2017-08-20 Thread Sergey Senozhatsky
Hello, On (08/18/17 00:04), Laurent Dufour wrote: > This is a port on kernel 4.13 of the work done by Peter Zijlstra to > handle page fault without holding the mm semaphore [1]. > > The idea is to try to handle user space page faults without holding the > mmap_sem. This should allow better concur

Re: [RFC PATCH v5 0/5] vfio-pci: Add support for mmapping MSI-X table

2017-08-20 Thread Alexey Kardashevskiy
Folks, Ok, people did talk, exchanged ideas, lovely :) What happens now? Do I repost this or go back to PCI bus flags or something else? Thanks. On 14/08/17 19:45, Alexey Kardashevskiy wrote: > Folks, > > Is there anything to change besides those compiler errors and David's > comment in 5/5? O

Re: [PATCH kernel] PCI: Disable IOV before pcibios_sriov_disable()

2017-08-20 Thread Alexey Kardashevskiy
On 19/08/17 01:27, Bjorn Helgaas wrote: > On Fri, Aug 18, 2017 at 08:05:42AM +1000, Alexey Kardashevskiy wrote: >> On 11/08/17 18:19, Alexey Kardashevskiy wrote: >>> From: Gavin Shan >>> >>> The PowerNV platform is the only user of pcibios_sriov_disable(). >>> The IOV BAR could be shifted by pci_i

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-20 Thread Nicholas Piggin
On Mon, 21 Aug 2017 10:52:58 +1000 Nicholas Piggin wrote: > On Sun, 20 Aug 2017 14:14:29 -0700 > "Paul E. McKenney" wrote: > > > On Sun, Aug 20, 2017 at 11:35:14AM -0700, Paul E. McKenney wrote: > > > On Sun, Aug 20, 2017 at 11:00:40PM +1000, Nicholas Piggin wrote: > > > > On Sun, 20 Aug

Re: [PATCH v2 00/20] Speculative page faults

2017-08-20 Thread Anshuman Khandual
On 08/18/2017 03:34 AM, Laurent Dufour wrote: > This is a port on kernel 4.13 of the work done by Peter Zijlstra to > handle page fault without holding the mm semaphore [1]. > > The idea is to try to handle user space page faults without holding the > mmap_sem. This should allow better concurrency