From: Weijie Yang <weijie.yang@samsung.com>
To: riel@redhat.com
Cc: 'Mel Gorman' <mgorman@suse.de>,
'Andrew Morton' <akpm@linux-foundation.org>,
'Minchan Kim' <minchan@kernel.org>,
weijie.yang.kh@gmail.com,
'linux-kernel' <linux-kernel@vger.kernel.org>,
'Linux-MM' <linux-mm@kvack.org>
Subject: [RFC PATCH] mm/vmscan: remove two un-needed mem_cgroup_page_lruvec() call
Date: Sun, 16 Feb 2014 11:30:54 +0800 [thread overview]
Message-ID: <000001cf2ac7$9abf23b0$d03d6b10$%yang@samsung.com> (raw)
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2014-02-16 3:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 3:30 Weijie Yang [this message]
2014-02-16 4:00 ` Hugh Dickins
2014-02-16 5:01 ` Weijie Yang
2014-02-16 5:25 ` Hugh Dickins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001cf2ac7$9abf23b0$d03d6b10$%yang@samsung.com' \
--to=weijie.yang@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=riel@redhat.com \
--cc=weijie.yang.kh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox