Making hotremovable attribute with memory section[3/4]
Subsystems (3)
Forwarded by Yasunori Goto <[email protected]> ----------------------- Original Message -----------------------
From: Yasunori Goto <[email protected]> To: [email protected] Date: Mon, 16 Aug 2004 14:37:05 -0700
Subject: [Lhms-devel] Making hotremovable attribute with memory section[3/4]
----
This patch is define __GFP_HOTREMOVABLE attribute.
Kernel can select attribute removable/un-removable section and allocate the pages by it.
Note:
The value of __ GFP_HOTREMOVABLE was 0x03 in the definition before.
This was used to make new hot-removable zone_list for same purpose. This zone_list method had the advantage that the number of steps of main routes did not increase.
However, all section's removable attributes in a node have to be
same in this method. So, this is meaningless on SMP machine.
Dividing free_area is to be more general way for localized allocation.
---
hotremovable-goto/include/linux/gfp.h | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
include/linux/gfp.h renamed from include/linux/gfp.h~gfp_hotremovable +7 -2
@@ -14,7 +14,6 @@ struct vm_area_struct;/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ #define __GFP_DMA 0x01#define __GFP_HIGHMEM 0x02 -/* * Action modifiers - doesn't change the zoning *
@@ -38,6 +37,12 @@ struct vm_area_struct;#define __GFP_NO_GROW 0x2000/* Slab internal usage */ #define __GFP_COMP 0x4000/* Add compound page metadata */ +#ifdef CONFIG_MEMORY_HOTPLUG +#define __GFP_HOTREMOVABLE 0x8000/* off: Un-hotremovable, on:Hotremovable */ +#else +#define __GFP_HOTREMOVABLE 0 +#endif +#define __GFP_BITS_SHIFT 16/* Room for 16 __GFP_FOO bits */ #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1)
@@ -51,7 +56,7 @@ struct vm_area_struct;#define GFP_NOFS (__GFP_WAIT | __GFP_IO)#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS) -#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HIGHMEM) +#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HIGHMEM | __GFP_HOTREMOVABLE)/* Flag - indicates that the buffer will be suitable for DMA. Ignored on some platforms, used as appropriate on others */
_
Signature · 26 lines
Yasunori Goto <ygoto at us.fujitsu.com> ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Lhms-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lhms-devel --------------------- Original Message Ends -------------------- -- Yasunori Goto <ygoto at us.fujitsu.com> -- 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>