Skip to content

Commit

Permalink
mm/compaction.c: avoid double mem_cgroup_del_lru()
Browse files Browse the repository at this point in the history
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 <minchan.kim@gmail.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Minchan Kim authored and Linus Torvalds committed Dec 23, 2010
1 parent 90a8a73 commit dd9e5ef
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit dd9e5ef

Please sign in to comment.