Skip to contentSkip to conversation

New zone ZONE_EASY_RECLAIM take 3. (define ZONE_EASY_RECLAIM)[2/5]

PATCH In review Yasunori Goto 2 participants 3 messages Dec 10, 2005 – Dec 16, 2005

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

PATCH 1/1 New zone ZONE_EASY_RECLAIM take 3. (define ZONE_EASY_RECLAIM)[2/5]

This defines new zone ZONE_EASY_RECLAIM. ZONES_SHIFT becomes 3.
And this patch add member of sysctl_lowmem_reserve_ratio[].

include/linux/mmzone.h +3 -2
Index: zone_reclaim/include/linux/mmzone.h
===================================================================
@@ -73,9 +73,10 @@ struct per_cpu_pageset {
 #define ZONE_DMA32		1
 #define ZONE_NORMAL		2
 #define ZONE_HIGHMEM		3
+#define ZONE_EASY_RECLAIM	4
 
-#define MAX_NR_ZONES		4	/* Sync this with ZONES_SHIFT */
-#define ZONES_SHIFT		2	/* ceil(log2(MAX_NR_ZONES)) */
+#define MAX_NR_ZONES		5	/* Sync this with ZONES_SHIFT */
+#define ZONES_SHIFT		3	/* ceil(log2(MAX_NR_ZONES)) */
 
 
 /*
mm/page_alloc.c +2 -2
Index: zone_reclaim/mm/page_alloc.c
===================================================================
@@ -66,7 +66,7 @@ static void fastcall free_hot_cold_page(
  * TBD: should special case ZONE_DMA32 machines here - in those we normally
  * don't need any ZONE_NORMAL reservation
  */
-int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 256, 256, 32 };
+int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 256, 256, 256, 32 ,32};
 
 EXPORT_SYMBOL(totalram_pages);
 
@@ -77,7 +77,7 @@ EXPORT_SYMBOL(totalram_pages);
 struct zone *zone_table[1 << ZONETABLE_SHIFT] __read_mostly;
 EXPORT_SYMBOL(zone_table);
 
-static char *zone_names[MAX_NR_ZONES] = { "DMA", "DMA32", "Normal", "HighMem" };
+static char *zone_names[MAX_NR_ZONES] = { "DMA", "DMA32", "Normal", "HighMem", "Easy Reclaim"};
 int min_free_kbytes = 1024;
 
 unsigned long __initdata nr_kernel_pages;
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>
#1 lore raw

Sorry for the slow reply. Hope feedback isn't too late.

Quoted 22 lines

Index: zone_reclaim/include/linux/mmzone.h
===================================================================

include/linux/mmzone.h +3 -2
@@ -73,9 +73,10 @@ struct per_cpu_pageset {
 #define ZONE_DMA32		1
 #define ZONE_NORMAL		2
 #define ZONE_HIGHMEM		3
+#define ZONE_EASY_RECLAIM	4
 
-#define MAX_NR_ZONES		4	/* Sync this with ZONES_SHIFT */
-#define ZONES_SHIFT		2	/* ceil(log2(MAX_NR_ZONES)) */
+#define MAX_NR_ZONES		5	/* Sync this with ZONES_SHIFT */
+#define ZONES_SHIFT		3	/* ceil(log2(MAX_NR_ZONES)) */
 
 
 /*

Index: zone_reclaim/mm/page_alloc.c
===================================================================

mm/page_alloc.c static void fastcall free_hot_cold_page( · line 69

Quoted 5 lines
mm/page_alloc.c +1 -1
@@ -66,7 +66,7 @@ static void fastcall free_hot_cold_page(
  * TBD: should special case ZONE_DMA32 machines here - in those we normally
  * don't need any ZONE_NORMAL reservation
  */
-int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 256, 256, 32 };
+int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 256, 256, 256, 32 ,32};

This line looks wrong. It looks you are initializing a 4 element array with 5 elements.

mm/page_alloc.c EXPORT_SYMBOL(totalram_pages); · line 83

Quoted 13 lines
mm/page_alloc.c +1 -1
 EXPORT_SYMBOL(totalram_pages);
 
@@ -77,7 +77,7 @@ EXPORT_SYMBOL(totalram_pages);
 struct zone *zone_table[1 << ZONETABLE_SHIFT] __read_mostly;
 EXPORT_SYMBOL(zone_table);
 
-static char *zone_names[MAX_NR_ZONES] = { "DMA", "DMA32", "Normal", "HighMem" };
+static char *zone_names[MAX_NR_ZONES] = { "DMA", "DMA32", "Normal", "HighMem", "Easy Reclaim"};
 int min_free_kbytes = 1024;
 
 unsigned long __initdata nr_kernel_pages;

--
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>

#2 lore raw
Quoted 1 line

Sorry for the slow reply. Hope feedback isn't too late.

Not late. :-)

Quoted 6 lines
Quoted 6 lines

/*
Index: zone_reclaim/mm/page_alloc.c
===================================================================

mm/page_alloc.c +0 -0
@@ -66,7 +66,7 @@ static void fastcall free_hot_cold_page(
Quoted 8 lines

mm/page_alloc.c static void fastcall free_hot_cold_page( · line 69

Quoted 5 lines
mm/page_alloc.c +1 -1
  * TBD: should special case ZONE_DMA32 machines here - in those we normally
  * don't need any ZONE_NORMAL reservation
  */
-int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 256, 256, 32 };
+int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = { 256, 256, 256, 32 ,32};

This line looks wrong. It looks you are initializing a 4 element array with 5 elements.

Oops. I made a mistake. Thanks.

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>