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 <[email protected]>
Acked-by: Balbir Singh <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Reviewed-by: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Minchan Kim authored and 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.