x86/mm/cpa: Add large page preservation statistics
authorThomas Gleixner <tglx@linutronix.de>
Mon, 17 Sep 2018 14:29:12 +0000 (16:29 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 27 Sep 2018 18:39:38 +0000 (20:39 +0200)
commit5c280cf6081ff99078e28b51172d78359f194fd9
treeafe95954061d8f2350f4114c58f8570ddbd315d4
parent4046460b867f8b041c81c26c09d3bcad6d6e814e
x86/mm/cpa: Add large page preservation statistics

The large page preservation mechanism is just magic and provides no
information at all. Add optional statistic output in debugfs so the magic can
be evaluated. Defaults is off.

Output:

 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:               800770
 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.160867778@linutronix.de
arch/x86/Kconfig
arch/x86/mm/pageattr.c