Skip to contentSkip to conversation

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

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

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

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

This defines __GFP flag for new zone with GFP_DMA32.

include/linux/gfp.h +4 -1
Index: zone_reclaim/include/linux/gfp.h
===================================================================
@@ -16,10 +16,13 @@ struct vm_area_struct;
 #define __GFP_HIGHMEM	((__force gfp_t)0x02u)
 #ifdef CONFIG_DMA_IS_DMA32
 #define __GFP_DMA32	((__force gfp_t)0x01)	/* ZONE_DMA is ZONE_DMA32 */
+#define __GFP_EASY_RECLAIM ((__force gfp_t)0x04u)
 #elif BITS_PER_LONG < 64
 #define __GFP_DMA32	((__force gfp_t)0x00)	/* ZONE_NORMAL is ZONE_DMA32 */
+#define __GFP_EASY_RECLAIM ((__force gfp_t)0x04u)
 #else
 #define __GFP_DMA32	((__force gfp_t)0x04)	/* Has own ZONE_DMA32 */
+#define __GFP_EASY_RECLAIM ((__force gfp_t)0x08u)
 #endif
 
 /*
@@ -64,7 +67,7 @@ struct vm_area_struct;
 #define GFP_KERNEL	(__GFP_WAIT | __GFP_IO | __GFP_FS)
 #define GFP_USER	(__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL)
 #define GFP_HIGHUSER	(__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \
-			 __GFP_HIGHMEM)
+			 __GFP_HIGHMEM | __GFP_EASY_RECLAIM)
 
 /* Flag - indicates that the buffer will be suitable for DMA.  Ignored on some
    platforms, used as appropriate on others */
include/linux/mmzone.h +1 -1
Index: zone_reclaim/include/linux/mmzone.h
===================================================================
@@ -93,7 +93,7 @@ struct per_cpu_pageset {
  *
  * NOTE! Make sure this matches the zones in <linux/gfp.h>
  */
-#define GFP_ZONEMASK	0x07
+#define GFP_ZONEMASK	0x0f
 #define GFP_ZONETYPES	5
 
 /*
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>