Messages in this thread Patch in this message | | | Subject | [PATCH 2/7] mm/balloon_compaction: keep ballooned pages away from normal migration path | From | Konstantin Khlebnikov <> | Date | Wed, 20 Aug 2014 19:04:40 +0400 |
| |
Proper testing shows yet another problem in balloon migration: it works only once for each page. balloon_page_movable() check page flags and page_count. In __unmap_and_move page is locked, reference counter is elevated, so balloon_page_movable() _always_ fails here. As result in __unmap_and_move() migration goes to the normal migration path.
Balloon ->migratepage() is so special, it returns MIGRATEPAGE_BALLOON_SUCCESS instead of MIGRATEPAGE_SUCCESS. After that in move_to_new_page() successfully migrated page got NULL into its mapping pointer and loses connectivity with balloon and ability for further migration.
It's safe to use __is_movable_balloon_page here: page is isolated and pinned.
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com> Cc: stable <stable@vger.kernel.org> # v3.8 --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c index f78ec9b..161d044 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -873,7 +873,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage, } } - if (unlikely(balloon_page_movable(page))) { + if (unlikely(__is_movable_balloon_page(page))) { /* * A ballooned page does not need any special attention from * physical to virtual reverse mapping procedures.
| |