From f0ea6a39be8f07aca147281632e9ef0623c6cffd Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Wed, 8 Feb 2012 17:13:38 -0800 Subject: [PATCH] --- yaml --- r: 287336 b: refs/heads/master c: dc9086004b3d5db75997a645b3fe08d9138b7ad0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/compaction.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ed28fc7a6ce1..d545a383ac75 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1ecd3c7ea76488c63b4b0a2561fd7eaf96cc8028 +refs/heads/master: dc9086004b3d5db75997a645b3fe08d9138b7ad0 diff --git a/trunk/mm/compaction.c b/trunk/mm/compaction.c index bd939a574b84..d9ebebe1a2aa 100644 --- a/trunk/mm/compaction.c +++ b/trunk/mm/compaction.c @@ -330,8 +330,17 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone, continue; nr_scanned++; - /* Get the page and skip if free */ + /* + * Get the page and ensure the page is within the same zone. + * See the comment in isolate_freepages about overlapping + * nodes. It is deliberate that the new zone lock is not taken + * as memory compaction should not move pages between nodes. + */ page = pfn_to_page(low_pfn); + if (page_zone(page) != zone) + continue; + + /* Skip if free */ if (PageBuddy(page)) continue;