[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090716173921.9D54.A69D9226@jp.fujitsu.com>
Date: Thu, 16 Jul 2009 17:40:12 +0900 (JST)
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: kosaki.motohiro@...fujitsu.com, linux-mm <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH 4/5] Use add_page_to_lru_list() helper function
Subject: Use add_page_to_lru_list() helper function
add_page_to_lru_list() is equivalent to
- add lru list (global)
- add lru list (mem-cgroup)
- modify zone stat
We can use it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
---
mm/vmscan.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: b/mm/vmscan.c
===================================================================
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1225,12 +1225,12 @@ static void move_active_pages_to_lru(str
while (!list_empty(list)) {
page = lru_to_page(list);
+ list_del(&page->lru);
VM_BUG_ON(PageLRU(page));
SetPageLRU(page);
- list_move(&page->lru, &zone->lru[lru].list);
- mem_cgroup_add_lru_list(page, lru);
+ add_page_to_lru_list(zone, page, lru);
pgmoved++;
if (!pagevec_add(&pvec, page) || list_empty(list)) {
@@ -1241,7 +1241,6 @@ static void move_active_pages_to_lru(str
spin_lock_irq(&zone->lru_lock);
}
}
- __mod_zone_page_state(zone, NR_LRU_BASE + lru, pgmoved);
if (!is_active_lru(lru))
__count_vm_events(PGDEACTIVATE, pgmoved);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists