From b92a6edd4b77a8794adb497280beea5df5e59a14 Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Tue, 16 Oct 2007 01:25:50 -0700 Subject: Add a configure option to group pages by mobility The grouping mechanism has some memory overhead and a more complex allocation path. This patch allows the strategy to be disabled for small memory systems or if it is known the workload is suffering because of the strategy. It also acts to show where the page groupings strategy interacts with the standard buddy allocator. Signed-off-by: Mel Gorman Signed-off-by: Joel Schopp Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mmzone.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux/mmzone.h') diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 57700038e66..7d7e4fe0fda 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -33,9 +33,15 @@ */ #define PAGE_ALLOC_COSTLY_ORDER 3 +#ifdef CONFIG_PAGE_GROUP_BY_MOBILITY #define MIGRATE_UNMOVABLE 0 #define MIGRATE_MOVABLE 1 #define MIGRATE_TYPES 2 +#else +#define MIGRATE_UNMOVABLE 0 +#define MIGRATE_MOVABLE 0 +#define MIGRATE_TYPES 1 +#endif #define for_each_migratetype_order(order, type) \ for (order = 0; order < MAX_ORDER; order++) \ -- cgit