lkml.org 
[lkml]   [2014]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH] mm/vmscan: remove two un-needed mem_cgroup_page_lruvec() call
Date
In putback_inactive_pages() and move_active_pages_to_lru(),
lruvec is already an input parameter and pages are all from this lruvec,
therefore there is no need to call mem_cgroup_page_lruvec() in loop.

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
---
mm/vmscan.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index a9c74b4..4804fdb 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1393,8 +1393,6 @@ putback_inactive_pages(struct lruvec *lruvec, struct list_head *page_list)
continue;
}

- lruvec = mem_cgroup_page_lruvec(page, zone);
-
SetPageLRU(page);
lru = page_lru(page);
add_page_to_lru_list(page, lruvec, lru);
@@ -1602,7 +1600,6 @@ static void move_active_pages_to_lru(struct lruvec *lruvec,

while (!list_empty(list)) {
page = lru_to_page(list);
- lruvec = mem_cgroup_page_lruvec(page, zone);

VM_BUG_ON_PAGE(PageLRU(page), page);
SetPageLRU(page);
--
1.7.10.4



\
 
 \ /
  Last update: 2014-02-16 05:01    [W:0.032 / U:24.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site