]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/swap.c
vmscan: evict streaming IO first
[linux-2.6-omap-h63xx.git] / mm / swap.c
index 2152e48a7b8f0726f06a88c516d82a0becf3c19d..2881987603ebd880fa6410553c2bef83b7a99d50 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -445,6 +445,7 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
        for (i = 0; i < pagevec_count(pvec); i++) {
                struct page *page = pvec->pages[i];
                struct zone *pagezone = page_zone(page);
+               int file;
 
                if (pagezone != zone) {
                        if (zone)
@@ -456,8 +457,12 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru)
                VM_BUG_ON(PageUnevictable(page));
                VM_BUG_ON(PageLRU(page));
                SetPageLRU(page);
-               if (is_active_lru(lru))
+               file = is_file_lru(lru);
+               zone->recent_scanned[file]++;
+               if (is_active_lru(lru)) {
                        SetPageActive(page);
+                       zone->recent_rotated[file]++;
+               }
                add_page_to_lru_list(zone, page, lru);
        }
        if (zone)