diff options
author | Andi Kleen <andi@firstfloor.org> | 2008-05-02 05:46:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 02:11:45 -0400 |
commit | ce0c0e50f94e8c55b00a722e8c6e8d6c802be211 (patch) | |
tree | cd8917c9f7917c75d2c65f2eaa2e4d4c60794bef /include/asm-x86/pgtable.h | |
parent | 1b40a895df6c7d5a80e71f65674060b03d84bbef (diff) |
x86, generic: CPA add statistics about state of direct mapping v4
Add information about the mapping state of the direct mapping to
/proc/meminfo. I chose /proc/meminfo because that is where all the other
memory statistics are too and it is a generally useful metric even
outside debugging situations. A lot of split kernel pages means the
kernel will run slower.
This way we can see how many large pages are really used for it and how
many are split.
Useful for general insight into the kernel.
v2: Add hotplug locking to 64bit to plug a very obscure theoretical race.
32bit doesn't need it because it doesn't support hotadd for lowmem.
Fix some typos
v3: Rename dpages_cnt
Add CONFIG ifdef for count update as requested by tglx
Expand description
v4: Fix stupid bugs added in v3
Move update_page_count to pageattr.c
Signed-off-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/pgtable.h')
-rw-r--r-- | include/asm-x86/pgtable.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index 97c271b2910b..111564fa5e70 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -369,8 +369,11 @@ enum { | |||
369 | PG_LEVEL_4K, | 369 | PG_LEVEL_4K, |
370 | PG_LEVEL_2M, | 370 | PG_LEVEL_2M, |
371 | PG_LEVEL_1G, | 371 | PG_LEVEL_1G, |
372 | PG_LEVEL_NUM | ||
372 | }; | 373 | }; |
373 | 374 | ||
375 | void update_page_count(int level, unsigned long pages); | ||
376 | |||
374 | /* | 377 | /* |
375 | * Helper function that returns the kernel pagetable entry controlling | 378 | * Helper function that returns the kernel pagetable entry controlling |
376 | * the virtual address 'address'. NULL means no pagetable entry present. | 379 | * the virtual address 'address'. NULL means no pagetable entry present. |