diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-09-17 17:29:16 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-09-27 21:39:39 +0300 |
commit | 9cc9f17a5a0a8564b41b7c5c460e7f078c42d712 (patch) | |
tree | fc016c698389d884fccd15a2b656eb610e23d25d /samples/uhid | |
parent | 1c4b406ee89c2c4210f2e19b97d39215f445c316 (diff) | |
download | linux-9cc9f17a5a0a8564b41b7c5c460e7f078c42d712.tar.xz |
x86/mm/cpa: Do the range check early
To avoid excessive 4k wise checks in the common case do a quick check first
whether the requested new page protections conflict with a static
protection area in the large page. If there is no conflict then the
decision whether to preserve or to split the page can be made immediately.
If the requested range covers the full large page, preserve it. Otherwise
split it up. No point in doing a slow crawl in 4k steps.
Before:
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
After:
1G pages checked: 2
1G pages sameprot: 0
1G pages preserved: 0
2M pages checked: 541
2M pages sameprot: 466
2M pages preserved: 47
4K pages checked: 514
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.507259989@linutronix.de
Diffstat (limited to 'samples/uhid')
0 files changed, 0 insertions, 0 deletions