diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-09-17 16:29:15 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-09-27 20:39:39 +0200 |
commit | 1c4b406ee89c2c4210f2e19b97d39215f445c316 (patch) | |
tree | 87f33a33efa58f5bf9645e403d77cf3b38d34148 /scripts/conmakehash.c | |
parent | x86/mm/cpa: Add sanity check for existing mappings (diff) | |
download | linux-1c4b406ee89c2c4210f2e19b97d39215f445c316.tar.xz linux-1c4b406ee89c2c4210f2e19b97d39215f445c316.zip |
x86/mm/cpa: Optimize same protection check
When the existing mapping is correct and the new requested page protections
are the same as the existing ones, then further checks can be omitted and the
large page can be preserved. The slow path 4k wise check will not come up with
a different result.
Before:
1G pages checked: 2
1G pages sameprot: 0
1G pages preserved: 0
2M pages checked: 540
2M pages sameprot: 466
2M pages preserved: 47
4K pages checked: 800709
4K pages set-checked: 7668
After:
1G pages checked: 2
1G pages sameprot: 0
1G pages preserved: 0
2M pages checked: 538
2M pages sameprot: 466
2M pages preserved: 47
4K pages checked: 560642
4K pages set-checked: 7668
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Dave Hansen <dave.hansen@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Bin Yang <bin.yang@intel.com>
Cc: Mark Gross <mark.gross@intel.com>
Link: https://lkml.kernel.org/r/20180917143546.424477581@linutronix.de
Diffstat (limited to 'scripts/conmakehash.c')
0 files changed, 0 insertions, 0 deletions