Re: [PATCH AUTOSEL 5.9 27/39] sched/idle: Fix arch_cpu_idle() vs tracing

2020-12-13 Thread Sasha Levin
On Thu, Dec 03, 2020 at 06:10:15PM +0100, Peter Zijlstra wrote: On Thu, Dec 03, 2020 at 03:54:42PM +0100, Heiko Carstens wrote: On Thu, Dec 03, 2020 at 08:28:21AM -0500, Sasha Levin wrote: > From: Peter Zijlstra > > [ Upstream commit 58c644ba512cfbc2e39b758dd979edd1d6d00e27 ] > > We call arch_c

Re: [PATCH] powerpc/ps3: use dma_mapping_error()

2020-12-13 Thread Geoff Levand
On 12/13/20 10:26 AM, Vincent Stehlé wrote: > The DMA address returned by dma_map_single() should be checked with > dma_mapping_error(). Fix the ps3stor_setup() function accordingly. > > Fixes: 80071802cb9c ("[POWERPC] PS3: Storage Driver Core") > Signed-off-by: Vincent Stehlé > Cc: Geoff Levand

Re: [PATCH] powerpc/ps3: use dma_mapping_error()

2020-12-13 Thread Geert Uytterhoeven
On Sun, Dec 13, 2020 at 8:06 PM Vincent Stehlé wrote: > The DMA address returned by dma_map_single() should be checked with > dma_mapping_error(). Fix the ps3stor_setup() function accordingly. > > Fixes: 80071802cb9c ("[POWERPC] PS3: Storage Driver Core") > Signed-off-by: Vincent Stehlé Reviewed

[PATCH] powerpc: fix alignment bug whithin the init sections

2020-12-13 Thread Ariel Marcovitch
This is a bug that can cause early crashes in configurations with a .exit.text section smaller than a page and a .init.text section that ends in the beginning of a physical page (this is kinda random, which might explain why this wasn't really encountered before). The init sections are ordered lik

[PATCH] powerpc/ps3: use dma_mapping_error()

2020-12-13 Thread Vincent Stehlé
The DMA address returned by dma_map_single() should be checked with dma_mapping_error(). Fix the ps3stor_setup() function accordingly. Fixes: 80071802cb9c ("[POWERPC] PS3: Storage Driver Core") Signed-off-by: Vincent Stehlé Cc: Geoff Levand Cc: Geert Uytterhoeven --- drivers/ps3/ps3stor_lib.c

Re: [PATCH v12 00/31] Speculative page faults

2020-12-13 Thread Joel Fernandes
On Tue, Jul 07, 2020 at 01:31:37PM +0800, Chinwen Chang wrote: [..] > > > Hi Laurent, > > > > > > We merged SPF v11 and some patches from v12 into our platforms. After > > > several experiments, we observed SPF has obvious improvements on the > > > launch time of applications, especially for those

[powerpc:next] BUILD SUCCESS WITH WARNING dddc4ef92d1ce92987da1d6926cdfa99e8acb622

2020-12-13 Thread kernel test robot
Warning in current branch: arch/powerpc/kernel/vdso32/vgettimeofday.c:13:5: warning: no previous prototype for function '__c_kernel_clock_gettime64' [-Wmissing-prototypes] Warning ids grouped by kconfigs: clang_recent_errors `-- powerpc64-randconfig-r025-20201213 `-- arch-powe

Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-12-13 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of December 11, 2020 10:11 am: >> On Dec 5, 2020, at 7:59 PM, Nicholas Piggin wrote: >> > >> I'm still going to persue shoot-lazies for the merge window. As you >> see it's about a dozen lines and a if (IS_ENABLED(... in core code. >> Your change is common

Re: [PATCH 2/2] powerpc/64s: Trim offlined CPUs from mm_cpumasks

2020-12-13 Thread Nicholas Piggin
Excerpts from Geert Uytterhoeven's message of December 10, 2020 7:06 pm: > Hi Nicholas, > > On Fri, Nov 20, 2020 at 4:01 AM Nicholas Piggin wrote: >> >> When offlining a CPU, powerpc/64s does not flush TLBs, rather it just >> leaves the CPU set in mm_cpumasks, so it continues to receive TLBIEs >>

Re: [PATCH 2/8] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-12-13 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of December 14, 2020 2:07 pm: > Excerpts from Andy Lutomirski's message of December 11, 2020 10:11 am: >>> On Dec 5, 2020, at 7:59 PM, Nicholas Piggin wrote: >>> >> >>> I'm still going to persue shoot-lazies for the merge window. As you >>> see it's about a

[PATCH v2 0/5] shoot lazy tlbs

2020-12-13 Thread Nicholas Piggin
This is another rebase, on top of mainline now (don't need the asm-generic tree), and without any x86 or membarrier changes. This makes the series far smaller and more manageable and without the controversial bits. Thanks, Nick Nicholas Piggin (5): lazy tlb: introduce lazy mm refcount helper fu

[PATCH v2 1/5] lazy tlb: introduce lazy mm refcount helper functions

2020-12-13 Thread Nicholas Piggin
Add explicit _lazy_tlb annotated functions for lazy mm refcounting. This makes things a bit more explicit, and allows explicit refcounting to be removed if it is not used. Signed-off-by: Nicholas Piggin --- arch/arm/mach-rpc/ecard.c| 2 +- arch/powerpc/mm/book3s64/radix_tlb.c | 4 +

[PATCH v2 2/5] lazy tlb: allow lazy tlb mm switching to be configurable

2020-12-13 Thread Nicholas Piggin
Add CONFIG_MMU_LAZY_TLB which can be configured out to disable the lazy tlb mechanism entirely, and switches to init_mm when switching to a kernel thread. NOMMU systems could easily go without this and save a bit of code and the refcount atomics, because their mm switch is a no-op. They have not b

[PATCH v2 3/5] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-12-13 Thread Nicholas Piggin
On big systems, the mm refcount can become highly contented when doing a lot of context switching with threaded applications (particularly switching between the idle thread and an application thread). Abandoning lazy tlb slows switching down quite a bit in the important user->idle->user cases, so

[PATCH v2 4/5] powerpc: use lazy mm refcount helper functions

2020-12-13 Thread Nicholas Piggin
Use _lazy_tlb functions for lazy mm refcounting in powerpc, to prepare to move to MMU_LAZY_TLB_SHOOTDOWN. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 8

[PATCH v2 5/5] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN

2020-12-13 Thread Nicholas Piggin
On a 16-socket 192-core POWER8 system, a context switching benchmark with as many software threads as CPUs (so each switch will go in and out of idle), upstream can achieve a rate of about 1 million context switches per second. After this patch it goes up to 118 million. Signed-off-by: Nicholas Pi

Re: [PATCH v2 3/5] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-12-13 Thread Randy Dunlap
On 12/13/20 10:53 PM, Nicholas Piggin wrote: > diff --git a/arch/Kconfig b/arch/Kconfig > index 84faaba66364..e69c974369cc 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -443,9 +443,22 @@ config MMU_LAZY_TLB > config MMU_LAZY_TLB_REFCOUNT > def_bool y > depends on MMU_LAZY_TLB >

[PATCH] powerpc/kup: Mark the kuap/keup function non __init

2020-12-13 Thread Aneesh Kumar K.V
Kernel call these functions on cpu online and hence they should not be marked __init. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s32/mmu.c | 4 ++-- arch/powerpc/mm/book3s64/pkeys.c | 4 ++-- arch/powerpc/mm/init-common.c| 2 +- arch/powerpc/mm/nohash/8xx.c | 4 ++-- 4 fi

Re: [PATCH] powerpc/kup: Mark the kuap/keup function non __init

2020-12-13 Thread Christophe Leroy
Le 14/12/2020 à 08:13, Aneesh Kumar K.V a écrit : Kernel call these functions on cpu online and hence they should not be marked __init. This is PPC64 only. See commit https://github.com/linuxppc/linux/commit/67d53f30e23ec66aa7bbdd1592d5e64d46876190#diff-9799ddc8e77e666295031a560afc2a754d2f