|
@@ -12,6 +12,9 @@
|
|
#include <linux/vmstat.h>
|
|
#include <linux/vmstat.h>
|
|
#include <linux/atomic.h>
|
|
#include <linux/atomic.h>
|
|
#include <linux/vmalloc.h>
|
|
#include <linux/vmalloc.h>
|
|
|
|
+#ifdef CONFIG_CMA
|
|
|
|
+#include <linux/cma.h>
|
|
|
|
+#endif
|
|
#include <asm/page.h>
|
|
#include <asm/page.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/pgtable.h>
|
|
#include "internal.h"
|
|
#include "internal.h"
|
|
@@ -137,6 +140,10 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
|
#endif
|
|
#endif
|
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
|
"AnonHugePages: %8lu kB\n"
|
|
"AnonHugePages: %8lu kB\n"
|
|
|
|
+#endif
|
|
|
|
+#ifdef CONFIG_CMA
|
|
|
|
+ "CmaTotal: %8lu kB\n"
|
|
|
|
+ "CmaFree: %8lu kB\n"
|
|
#endif
|
|
#endif
|
|
,
|
|
,
|
|
K(i.totalram),
|
|
K(i.totalram),
|
|
@@ -187,11 +194,15 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
|
vmi.used >> 10,
|
|
vmi.used >> 10,
|
|
vmi.largest_chunk >> 10
|
|
vmi.largest_chunk >> 10
|
|
#ifdef CONFIG_MEMORY_FAILURE
|
|
#ifdef CONFIG_MEMORY_FAILURE
|
|
- ,atomic_long_read(&num_poisoned_pages) << (PAGE_SHIFT - 10)
|
|
|
|
|
|
+ , atomic_long_read(&num_poisoned_pages) << (PAGE_SHIFT - 10)
|
|
#endif
|
|
#endif
|
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
|
- ,K(global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) *
|
|
|
|
|
|
+ , K(global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) *
|
|
HPAGE_PMD_NR)
|
|
HPAGE_PMD_NR)
|
|
|
|
+#endif
|
|
|
|
+#ifdef CONFIG_CMA
|
|
|
|
+ , K(totalcma_pages)
|
|
|
|
+ , K(global_page_state(NR_FREE_CMA_PAGES))
|
|
#endif
|
|
#endif
|
|
);
|
|
);
|
|
|
|
|