[PATCH 1/3] balancenuma: put page if avoid migrating page

From: Hillf Danton
Date: Tue Nov 27 2012 - 08:23:49 EST


If we have to avoid migrating to a node that is nearly full, put page
and return zero.

Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx>
---

--- a/mm/migrate.c Tue Nov 27 20:09:38 2012
+++ b/mm/migrate.c Tue Nov 27 20:15:00 2012
@@ -1538,9 +1538,11 @@ int numamigrate_isolate_page(pg_data_t *
mod_zone_page_state(page_zone(page),
NR_ISOLATED_ANON + page_lru,
HPAGE_PMD_NR);
+ return 1;
}

- return 1;
+ put_page(page);
+ return 0;
}

/*
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/