Re: [PATCH 2/2] Page migration via Swap V2: MPOL_MF_MOVE interface

Christoph Lameter
2005-10-18T16:46:09Z

On Tue, 18 Oct 2005, Magnus Damm wrote:

> isolate_lru_page() calls get_page_testone(), and swapout_pages() seems
> to call __put_page(). But who decrements page->_count in the case of
> putback_lru_pages()?

Right. Here is a patch that does a put_page in putback_lru_pages():

Index: linux-2.6.14-rc4-mm1/mm/vmscan.c
===================================================================
--- linux-2.6.14-rc4-mm1.orig/mm/vmscan.c 2005-10-17 16:19:21.000000000 -0700
+++ linux-2.6.14-rc4-mm1/mm/vmscan.c 2005-10-18 09:36:36.000000000 -0700
@@ -894,6 +894,8 @@ int putback_lru_pages(struct list_head *
count++;
}
spin_unlock_irq(&zone->lru_lock);
+ /* Undo the get from isolate_lru_page */
+ put_page(page);
}
return count;
}