[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201002162101.665549-7-kaleshsingh@google.com>
Date: Fri, 2 Oct 2020 16:20:51 +0000
From: Kalesh Singh <kaleshsingh@...gle.com>
To: unlisted-recipients:; (no To-header on input)
Cc: surenb@...gle.com, minchan@...gle.com, joelaf@...gle.com,
lokeshgidra@...gle.com, kaleshsingh@...gle.com,
kernel-team@...roid.com, Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>,
Kees Cook <keescook@...omium.org>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Sami Tolvanen <samitolvanen@...gle.com>,
Frederic Weisbecker <frederic@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Hassan Naveed <hnaveed@...ecomp.com>,
Christian Brauner <christian.brauner@...ntu.com>,
Stephen Boyd <sboyd@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mark Brown <broonie@...nel.org>,
Mike Rapoport <rppt@...nel.org>, Gavin Shan <gshan@...hat.com>,
Zhenyu Ye <yezhenyu2@...wei.com>,
Anshuman Khandual <anshuman.khandual@....com>,
Jia He <justin.he@....com>, John Hubbard <jhubbard@...dia.com>,
Zi Yan <ziy@...dia.com>, Dave Hansen <dave.hansen@...el.com>,
Mina Almasry <almasrymina@...gle.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Ram Pai <linuxram@...ibm.com>,
Ralph Campbell <rcampbell@...dia.com>,
Sandipan Das <sandipan@...ux.ibm.com>,
Brian Geffon <bgeffon@...gle.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
SeongJae Park <sjpark@...zon.de>, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org
Subject: [PATCH v2 6/6] x86: mremap speedup - Enable HAVE_MOVE_PUD
HAVE_MOVE_PUD enables remapping pages at the PUD level if both the
source and destination addresses are PUD-aligned.
With HAVE_MOVE_PUD enabled it can be inferred that there is approximately
a 13x improvement in performance on x86. (See data below).
------- Test Results ---------
The following results were obtained using a 5.4 kernel, by remapping
a PUD-aligned, 1GB sized region to a PUD-aligned destination.
The results from 10 iterations of the test are given below:
Total mremap times for 1GB data on x86. All times are in nanoseconds.
Control HAVE_MOVE_PUD
180394 15089
235728 14056
238931 25741
187330 13838
241742 14187
177925 14778
182758 14728
160872 14418
205813 15107
245722 13998
205721.5 15594 <-- Mean time in nanoseconds
A 1GB mremap completion time drops from ~205 microseconds
to ~15 microseconds on x86. (~13x speed up).
Signed-off-by: Kalesh Singh <kaleshsingh@...gle.com>
---
arch/x86/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 7101ac64bb20..ff6e2755cab8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -198,6 +198,7 @@ config X86
select HAVE_MIXED_BREAKPOINTS_REGS
select HAVE_MOD_ARCH_SPECIFIC
select HAVE_MOVE_PMD
+ select HAVE_MOVE_PUD
select HAVE_NMI
select HAVE_OPROFILE
select HAVE_OPTPROBES
--
2.28.0.806.g8561365e88-goog
Powered by blists - more mailing lists