diff options
author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2017-07-24 18:25:58 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-07-25 11:22:09 +0200 |
commit | 04b67022fb6d5b13025591f61a487a6ef7f4f05c (patch) | |
tree | 1bf6f1bd2104b15b5cc2efcb8cc31c9e69bd1451 /Documentation/x86 | |
parent | 10af6235e0d327d42e1bad974385197817923dc1 (diff) | |
download | op-kernel-dev-04b67022fb6d5b13025591f61a487a6ef7f4f05c.zip op-kernel-dev-04b67022fb6d5b13025591f61a487a6ef7f4f05c.tar.gz |
x86/mm/dump_pagetables: Speed up page tables dump for CONFIG_KASAN=y
KASAN fills kernel page tables with repeated values to map several
TBs of the virtual memory to the single kasan_zero_page:
kasan_zero_p4d ->
kasan_zero_pud ->
kasan_zero_pmd->
kasan_zero_pte->
kasan_zero_page
Walking the whole KASAN shadow range takes a lot of time, especially
with 5-level page tables. Since we already know that all kasan page tables
eventually point to the kasan_zero_page we could call note_page()
right and avoid walking lower levels of the page tables.
This will not affect the output of the kernel_page_tables file,
but let us avoid spending time in page table walkers:
Before:
$ time cat /sys/kernel/debug/kernel_page_tables > /dev/null
real 0m55.855s
user 0m0.000s
sys 0m55.840s
After:
$ time cat /sys/kernel/debug/kernel_page_tables > /dev/null
real 0m0.054s
user 0m0.000s
sys 0m0.054s
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170724152558.24689-1-aryabinin@virtuozzo.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'Documentation/x86')
0 files changed, 0 insertions, 0 deletions