This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / mm / swap.c
index 7771d28..015dc5e 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -30,6 +30,7 @@
 #include <linux/cpu.h>
 #include <linux/notifier.h>
 #include <linux/init.h>
+#include <linux/ckrm_mem_inline.h>
 
 /* How many pages do we try to swap or page in/out together? */
 int page_cluster;
@@ -71,7 +72,12 @@ EXPORT_SYMBOL(put_page);
  */
 int rotate_reclaimable_page(struct page *page)
 {
-       struct zone *zone;
+#ifdef CONFIG_CKRM_RES_MEM
+       struct ckrm_zone *ckrm_zone = page_ckrmzone(page);
+       struct zone *zone = ckrm_zone->zone;
+#else
+       struct zone *zone = page_zone(page);
+#endif
        unsigned long flags;
 
        if (PageLocked(page))
@@ -83,11 +89,10 @@ int rotate_reclaimable_page(struct page *page)
        if (!PageLRU(page))
                return 1;
 
-       zone = page_zone(page);
        spin_lock_irqsave(&zone->lru_lock, flags);
        if (PageLRU(page) && !PageActive(page)) {
                list_del(&page->lru);
-               list_add_tail(&page->lru, &zone->inactive_list);
+               ckrm_add_tail_inactive(page);
                inc_page_state(pgrotated);
        }
        if (!test_clear_page_writeback(page))