• Thomas Gleixner's avatar
    x86/mm/cpa: Avoid the 4k pages check completely · 585948f4
    Thomas Gleixner authored
    The extra loop which tries hard to preserve large pages in case of conflicts
    with static protection regions turns out to be not preserving anything, at
    least not in the experiments which have been conducted.
    
    There might be corner cases in which the code would be able to preserve a
    large page oaccsionally, but it's really not worth the extra code and the
    cycles wasted in the common case.
    
    Before:
    
     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
    
    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 set-checked:             7668
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: default avatarDave 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.589642503@linutronix.de
    585948f4
pageattr.c 58.4 KB