All of lore.kernel.org
 help / color / mirror / Atom feed
* [x86] Make split_page_count check for empty levels.
@ 2016-01-11 17:04 Dave Jones
  2016-01-12 10:12 ` [tip:x86/urgent] x86/mm: " tip-bot for Dave Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2016-01-11 17:04 UTC (permalink / raw)
  To: x86; +Cc: Linux Kernel

In PAGEALLOC_DEBUG builds, we disable the 2M pages.
Unfortunatly when we split up mappings during boot,
split_page_count doesn't take this into account, and
starts decrementing an empty direct_pages_count level.

This results in /proc/meminfo showing crazy things like
DirectMap2M:    18446744073709543424 kB

Signed-off-by: Dave Jones <davej@codemonkey.org.uk>

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index a3137a4feed1..ff0e0c6c350e 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -66,6 +66,9 @@ void update_page_count(int level, unsigned long pages)
 
 static void split_page_count(int level)
 {
+	if (direct_pages_count[level] == 0)
+		return;
+
 	direct_pages_count[level]--;
 	direct_pages_count[level - 1] += PTRS_PER_PTE;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-12 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-11 17:04 [x86] Make split_page_count check for empty levels Dave Jones
2016-01-12 10:12 ` [tip:x86/urgent] x86/mm: " tip-bot for Dave Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.