From: Minchan Kim Date: Wed, 22 Dec 2010 01:24:16 +0000 (-0800) Subject: mm/compaction.c: avoid double mem_cgroup_del_lru() X-Git-Tag: v2.6.37-rc8~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd9e5efe3aa9fc5b1ce484a531ecdba3a7a30bbf;p=profile%2Fcommon%2Fkernel-common.git mm/compaction.c: avoid double mem_cgroup_del_lru() del_page_from_lru_list() already called mem_cgroup_del_lru(). So we must not call it again. It adds unnecessary overhead. It was not a runtime bug because the TestClearPageCgroupAcctLRU() early in mem_cgroup_del_lru_list() will prevent any double-deletion, etc. Signed-off-by: Minchan Kim Acked-by: Balbir Singh Acked-by: KAMEZAWA Hiroyuki Acked-by: Mel Gorman Reviewed-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/compaction.c b/mm/compaction.c index 4d709ee..1a8894e 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -279,7 +279,6 @@ static unsigned long isolate_migratepages(struct zone *zone, /* Successfully isolated */ del_page_from_lru_list(zone, page, page_lru(page)); list_add(&page->lru, migratelist); - mem_cgroup_del_lru(page); cc->nr_migratepages++; /* Avoid isolating too much */