[RHEL7,COMMIT] ms/mm: select HAVE_MOVE_PMD on x86 for faster mremap

Submitted by Konstantin Khorenko on Jan. 10, 2019, 11:10 a.m.

Details

Message ID 201901101110.x0ABA2GK005717@finist-ce7.sw.ru
State New
Series "ms/mm: select HAVE_MOVE_PMD on x86 for faster mremap"
Headers show

Commit Message

Konstantin Khorenko Jan. 10, 2019, 11:10 a.m.
The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.83.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.83.4
------>
commit d2a46b09c31cd9bcb362bc03f31cb8162ed4eeea
Author: Joel Fernandes (Google) <joel@joelfernandes.org>
Date:   Thu Jan 3 15:28:41 2019 -0800

    ms/mm: select HAVE_MOVE_PMD on x86 for faster mremap
    
    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.
    
    Link: http://lkml.kernel.org/r/20181108181201.88826-4-joelaf@google.com
    Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
    Suggested-by: Kirill A. Shutemov <kirill@shutemov.name>
    Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
    Cc: Julia Lawall <Julia.Lawall@lip6.fr>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: William Kucharski <william.kucharski@oracle.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    
    (cherry picked from commit 9f132f7e145506efc0744426cb338b18a54afc3b)
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    
    Patchset description:
    
    Patch "mm: speed up mremap by 20x on large regions" introduces
    optimization: when a moved region has source and destination addresses
    and size equal to multiple of PMD_SIZE; PTEs are not really copyed.
    Instead of this, new PMD pointer is changed to point to old PTEs, while
    old PMD is cleared.
    
    This may be useful, when CRIU remaps large memory areas on restore (but
    really, alignment to PMD_SIZE is not very often, though possible).
---
 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 35add8085a41..0534a73f379f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -35,6 +35,7 @@  config X86
 	select ARCH_SUPPORTS_INT128 if X86_64
 	select ARCH_WANTS_PROT_NUMA_PROT_NONE
 	select HAVE_IDE
+	select HAVE_MOVE_PMD
 	select HAVE_OPROFILE
 	select HAVE_PCSPKR_PLATFORM
 	select HAVE_PERF_EVENTS