Skip to contentSkip to conversation

New zone ZONE_EASY_RECLAIM take 4. (/proc/meminfo)[6/8]

PATCH New Yasunori Goto 1 participant 1 message Dec 20, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 New zone ZONE_EASY_RECLAIM take 4. (/proc/meminfo)[6/8]

This patch is add information of easy reclaim zone to /proc/meminfo.

This is new patch at take 4.

--

fs/proc/proc_misc.c +14 -3
Index: zone_reclaim/fs/proc/proc_misc.c
===================================================================
@@ -126,6 +126,7 @@ static int meminfo_read_proc(char *page,
 	unsigned long free;
 	unsigned long committed;
 	unsigned long allowed;
+	unsigned long totalhigh, freehigh;
 	struct vmalloc_info vmi;
 	long cached;
 
@@ -147,7 +148,13 @@ static int meminfo_read_proc(char *page,
 		cached = 0;
 
 	get_vmalloc_info(&vmi);
-
+	if (i.totalhigh) {
+		totalhigh = i.totalhigh - i.total_easyreclaim;
+		freehigh = i.freehigh - i.free_easyreclaim;
+	} else {
+		totalhigh = 0;
+		freehigh = 0;
+	}
 	/*
 	 * Tagged format, for easy grepping and expansion.
 	 */
@@ -161,6 +168,8 @@ static int meminfo_read_proc(char *page,
 		"Inactive:     %8lu kB\n"
 		"HighTotal:    %8lu kB\n"
 		"HighFree:     %8lu kB\n"
+		"ReclaimTotal: %8lu kB\n"
+		"ReclaimFree:  %8lu kB\n"
 		"LowTotal:     %8lu kB\n"
 		"LowFree:      %8lu kB\n"
 		"SwapTotal:    %8lu kB\n"
@@ -182,8 +191,10 @@ static int meminfo_read_proc(char *page,
 		K(total_swapcache_pages),
 		K(active),
 		K(inactive),
-		K(i.totalhigh),
-		K(i.freehigh),
+		K(totalhigh),
+		K(freehigh),
+		K(i.total_easyreclaim),
+		K(i.free_easyreclaim),
 		K(i.totalram-i.totalhigh),
 		K(i.freeram-i.freehigh),
 		K(i.totalswap),
include/linux/kernel.h +2 -0
Index: zone_reclaim/include/linux/kernel.h
===================================================================
@@ -303,6 +303,8 @@ struct sysinfo {
 	unsigned short pad;		/* explicit padding for m68k */
 	unsigned long totalhigh;	/* Total high memory size */
 	unsigned long freehigh;		/* Available high memory size */
+	unsigned long total_easyreclaim;/* Total easy reclaim size */
+	unsigned long free_easyreclaim; /* Available easy reclaim size */
 	unsigned int mem_unit;		/* Memory unit size in bytes */
 	char _f[20-2*sizeof(long)-sizeof(int)];	/* Padding: libc5 uses this.. */
 };
mm/page_alloc.c +36 -5

65 lines not on this page · raw message

Signature · 8 lines
Yasunori Goto 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>