| commit | 7df666253f2610284f653bce0e2e50b4923c84aa | [log] [tgz] |
|---|---|---|
| author | Kalesh Singh <[email protected]> | Mon Dec 14 19:07:25 2020 -0800 |
| committer | Linus Torvalds <[email protected]> | Tue Dec 15 12:13:40 2020 -0800 |
| tree | bca60256307e0519b844c805eb58efc16d6342ee | |
| parent | 3a250629d7325f27b278dad1aaf44eab00090e76 [diff] |
kselftests: vm: add mremap tests
Patch series "Speed up mremap on large regions", v4.
mremap time can be optimized by moving entries at the PMD/PUD level if the
source and destination addresses are PMD/PUD-aligned and PMD/PUD-sized.
Enable moving at the PMD and PUD levels on arm64 and x86. Other
architectures where this type of move is supported and known to be safe
can also opt-in to these optimizations by enabling HAVE_MOVE_PMD and
HAVE_MOVE_PUD.
Observed Performance Improvements for remapping a PUD-aligned 1GB-sized
region on x86 and arm64:
- HAVE_MOVE_PMD is already enabled on x86 : N/A
- Enabling HAVE_MOVE_PUD on x86 : ~13x speed up
- Enabling HAVE_MOVE_PMD on arm64 : ~ 8x speed up
- Enabling HAVE_MOVE_PUD on arm64 : ~19x speed up
Altogether, HAVE_MOVE_PMD and HAVE_MOVE_PUD
give a total of ~150x speed up on arm64.
This patch (of 4):
Test mremap on regions of various sizes and alignments and validate data
after remapping. Also provide total time for remapping the region which
is useful for performance comparison of the mremap optimizations that move
pages at the PMD/PUD levels if HAVE_MOVE_PMD and/or HAVE_MOVE_PUD are
enabled.
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kalesh Singh <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Lokesh Gidra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Sami Tolvanen <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Hassan Naveed <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Gavin Shan <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Steven Price <[email protected]>
Cc: Jia He <[email protected]>
Cc: Ram Pai <[email protected]>
Cc: Sandipan Das <[email protected]>
Cc: Zi Yan <[email protected]>
Cc: Mina Almasry <[email protected]>
Cc: Ralph Campbell <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Brian Geffon <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: SeongJae Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>