[patch V2 08/10] x86/mm/cpa: Optimize same protection check

2018-09-14 Thread Thomas Gleixner
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:

[patch V2 08/10] x86/mm/cpa: Optimize same protection check

2018-09-14 Thread Thomas Gleixner
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: