[lkml]   [2014]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] lib: show_mem: This patch adds cma reserved infromation
This patch adds cma reserved information which is currently
shown as a part of total reserved only. This patch is
continuation of our previos cma patches related to this.

Signed-off-by: Vishnu Pratap Singh <>
lib/show_mem.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/lib/show_mem.c b/lib/show_mem.c
index 0922579..a0e50d7 100644
--- a/lib/show_mem.c
+++ b/lib/show_mem.c
@@ -8,6 +8,9 @@
#include <linux/mm.h>
#include <linux/nmi.h>
#include <linux/quicklist.h>
+#ifdef CONFIG_CMA
+#include <linux/cma.h>

void show_mem(unsigned int filter)
@@ -38,7 +41,12 @@ void show_mem(unsigned int filter)

printk("%lu pages RAM\n", total);
printk("%lu pages HighMem/MovableOnly\n", highmem);
+#ifdef CONFIG_CMA
+ printk("%lu pages reserved\n", (reserved - totalcma_pages));
+ printk("%lu pages cma reserved\n", totalcma_pages);
printk("%lu pages reserved\n", reserved);
printk("%lu pages in pagetable cache\n",

 \ /
  Last update: 2014-10-23 06:41    [W:0.078 / U:4.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site