Skip to content

Commit

Permalink
mm: vmscan: check if we isolated a compound page during lumpy scan
Browse files Browse the repository at this point in the history
Properly take into account if we isolated a compound page during the lumpy
scan in reclaim and skip over the tail pages when encountered.  This
corrects the values given to the tracepoint for number of lumpy pages
isolated and will avoid breaking the loop early if compound pages smaller
than the requested allocation size are requested.

[[email protected]: Updated changelog]
Signed-off-by: Andrea Arcangeli <[email protected]>
Signed-off-by: Mel Gorman <[email protected]>
Reviewed-by: Minchan Kim <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Jan Kara <[email protected]>
Cc: Andy Isaacson <[email protected]>
Cc: Nai Xia <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
aagit authored and torvalds committed Jan 13, 2012
1 parent b16d3d5 commit 5013473
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,13 +1196,17 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
break;

if (__isolate_lru_page(cursor_page, mode, file) == 0) {
unsigned int isolated_pages;

mem_cgroup_lru_del(cursor_page);
list_move(&cursor_page->lru, dst);
nr_taken += hpage_nr_pages(cursor_page);
nr_lumpy_taken++;
isolated_pages = hpage_nr_pages(cursor_page);
nr_taken += isolated_pages;
nr_lumpy_taken += isolated_pages;
if (PageDirty(cursor_page))
nr_lumpy_dirty++;
nr_lumpy_dirty += isolated_pages;
scan++;
pfn += isolated_pages - 1;
} else {
/*
* Check if the page is freed already.
Expand Down

0 comments on commit 5013473

Please sign in to comment.