On Mon, Jun 09, 2014 at 11:26:20AM +0200, Vlastimil Babka wrote:
From: David Rientjes <rientjes@xxxxxxxxxx>
struct compact_control currently converts the gfp mask to a migratetype, but we
need the entire gfp mask in a follow-up patch.
Pass the entire gfp mask as part of struct compact_control.
Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Cc: Michal Nazarewicz <mina86@xxxxxxxxxx>
Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
---
mm/compaction.c | 12 +++++++-----
mm/internal.h | 2 +-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index c339ccd..d1e30ba 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -965,8 +965,8 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
return ISOLATE_SUCCESS;
}
-static int compact_finished(struct zone *zone,
- struct compact_control *cc)
+static int compact_finished(struct zone *zone, struct compact_control *cc,
+ const int migratetype)
If we has gfp_mask, we could use gfpflags_to_migratetype from cc->gfp_mask.
What's is your intention?