[PATCH -next 3/3] mm: select HAVE_MOVE_PMD in x86 for faster mremap

2018-11-02 Thread Joel Fernandes
From: "Joel Fernandes (Google)" Moving page-tables at the PMD-level on x86 is known to be safe. Enable this option so that we can do fast mremap when possible. Suggested-by: Kirill A. Shutemov Acked-by: Kirill A. Shutemov Signed-off-by: Joel Fernandes (Google) --- arch/x86/Kconfig | 1 + 1

[PATCH -next 2/3] mm: speed up mremap by 20x on large regions (v4)

2018-11-02 Thread Joel Fernandes
From: "Joel Fernandes (Google)" Android needs to mremap large regions of memory during memory management related operations. The mremap system call can be really slow if THP is not enabled. The bottleneck is move_page_tables, which is copying each pte at a time, and can be really slow across a

[PATCH -next 1/3] mm: treewide: remove unused address argument from pte_alloc functions (v2)

2018-11-02 Thread Joel Fernandes
From: "Joel Fernandes (Google)" This series speeds up mremap(2) syscall by copying page tables at the PMD level even for non-THP systems. There is concern that the extra 'address' argument that mremap passes to pte_alloc may do something subtle architecture related in the future that may make

[PATCH -next 0/3] Add support for fast mremap

2018-11-02 Thread Joel Fernandes
Hi, Here is the latest "fast mremap" series. This just a repost with Kirill's Acked-bys added. I would like this to be considered for linux -next. I also dropped the CONFIG enablement patch for arm64 since I am yet to test it with the new TLB flushing code that is in very recent kernel releases.

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-02 Thread Andrey Ryabinin
On 11/01/2018 07:32 PM, Peter Zijlstra wrote: > On Thu, Nov 01, 2018 at 03:22:15PM +, Trond Myklebust wrote: >> On Thu, 2018-11-01 at 15:59 +0100, Peter Zijlstra wrote: >>> On Thu, Nov 01, 2018 at 01:18:46PM +, Mark Rutland wrote: > > My one question (and the reason why I went with

[PATCH] macintosh: ans-lcd: make anslcd_logo static and __initconst

2018-11-02 Thread Rasmus Villemoes
This variable has no reason to have external linkage, and since it is only used in an __init function, it might as well be made __initconst also. Signed-off-by: Rasmus Villemoes --- drivers/macintosh/ans-lcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] powerpc/math-emu: Fix building with clang

2018-11-02 Thread Segher Boessenkool
On Fri, Nov 02, 2018 at 10:38:36AM -0700, Nick Desaulniers wrote: > On Fri, Nov 2, 2018 at 10:34 AM Segher Boessenkool > wrote: > > > > On Fri, Nov 02, 2018 at 02:07:13PM +1030, Joel Stanley wrote: > > > arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a > > > inline asm

Re: [PATCH] powerpc/math-emu: Fix building with clang

2018-11-02 Thread Segher Boessenkool
On Fri, Nov 02, 2018 at 02:07:13PM +1030, Joel Stanley wrote: > arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a > inline asm context requiring an l-value: remove the cast or build with > -fheinous-gnu-extensions (It is spelled lvalue). *All* of extended asm is a GNU

Re: [PATCH] powerpc/math-emu: Fix building with clang

2018-11-02 Thread Nick Desaulniers
On Thu, Nov 1, 2018 at 8:37 PM Joel Stanley wrote: > > make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- > ppc44x_defconfig > make CC=clang-8 ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu- > > ... > > arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a >

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-4.20-2 tag

2018-11-02 Thread Linus Torvalds
On Fri, Nov 2, 2018 at 4:37 AM Michael Ellerman wrote: > > powerpc fixes for 4.20 #2 Pulled, Linus

RE: powerpc/xmon: Relax frame size for clang

2018-11-02 Thread David Laight
From: Linuxppc-dev [mailto:linuxppc-dev-bounces+david.laight=aculab@lists.ozlabs.org] On Behalf Of > Michael Ellerman > Subject: Re: powerpc/xmon: Relax frame size for clang > > On Wed, 2018-10-31 at 01:09:34 UTC, Joel Stanley wrote: > > When building with clang (8 trunk, 7.0 release) the

RE: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-02 Thread David Laight
From: Paul E. McKenney > Sent: 01 November 2018 17:02 ... > And there is a push to define C++ signed arithmetic as 2s complement, > but there are still 1s complement systems with C compilers. Just not > C++ compilers. Legacy... Hmmm... I've used C compilers for DSPs where signed integer

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-02 Thread Paul E. McKenney
On Fri, Nov 02, 2018 at 01:23:28PM +0100, Peter Zijlstra wrote: > On Fri, Nov 02, 2018 at 10:56:31AM +, David Laight wrote: > > From: Paul E. McKenney > > > Sent: 01 November 2018 17:02 > > ... > > > And there is a push to define C++ signed arithmetic as 2s complement, > > > but there are

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-02 Thread Paul E. McKenney
On Fri, Nov 02, 2018 at 10:56:31AM +, David Laight wrote: > From: Paul E. McKenney > > Sent: 01 November 2018 17:02 > ... > > And there is a push to define C++ signed arithmetic as 2s complement, > > but there are still 1s complement systems with C compilers. Just not > > C++ compilers.

Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed

2018-11-02 Thread Peter Zijlstra
On Fri, Nov 02, 2018 at 10:56:31AM +, David Laight wrote: > From: Paul E. McKenney > > Sent: 01 November 2018 17:02 > ... > > And there is a push to define C++ signed arithmetic as 2s complement, > > but there are still 1s complement systems with C compilers. Just not > > C++ compilers.

[GIT PULL] Please pull powerpc/linux.git powerpc-4.20-2 tag

2018-11-02 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Linus, Please pull a few more powerpc updates for 4.20: The following changes since commit 58cfbac25b1fd2b76f94566aed28a3662b0ff8c6: Revert "selftests/powerpc: Fix out-of-tree build errors" (2018-10-26 21:58:58 +1100) are available in the

Re: [PATCH] powerpc/powernv: remove dead npu-dma code

2018-11-02 Thread Michael Ellerman
Alexey Kardashevskiy writes: > On 31/10/2018 00:31, Christoph Hellwig wrote: >> This code has never been unused in the kernel since it was merged, and >> there has been no attempt that I could find to even submit users for >> it. Besides the general policy of not keep 1000+ lines of dead >>

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-11-02 Thread Michael Ellerman
Alan Modra writes: > On Thu, Nov 01, 2018 at 02:55:34PM +1100, Michael Ellerman wrote: >> Hi Florian, >> >> Florian Weimer writes: >> > We tried to use Go to build PIE binaries, and while the Go toolchain is >> > definitely not ready (it produces text relocations and problematic >> >

Re: PIE binaries are no longer mapped below 4 GiB on ppc64le

2018-11-02 Thread Michael Ellerman
Florian Weimer writes: > * Michael Ellerman: > >> Hi Florian, >> >> Florian Weimer writes: >>> We tried to use Go to build PIE binaries, and while the Go toolchain is >>> definitely not ready (it produces text relocations and problematic >>> relocations in general), it exposed what could be an