Skip to content

Commit

Permalink
mm: fix page reclaim comment error
Browse files Browse the repository at this point in the history
Since there are five lists in LRU cache, the array nr in get_scan_count
should be:

nr[0] = anon inactive pages to scan; nr[1] = anon active pages to scan
nr[2] = file inactive pages to scan; nr[3] = file active pages to scan

Signed-off-by: Wanpeng Li <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Acked-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Wanpeng Li authored and Jiri Kosina committed Jun 28, 2012
1 parent 422aa27 commit be7bd59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,8 @@ static int vmscan_swappiness(struct mem_cgroup_zone *mz,
* by looking at the fraction of the pages scanned we did rotate back
* onto the active list instead of evict.
*
* nr[0] = anon pages to scan; nr[1] = file pages to scan
* nr[0] = anon inactive pages to scan; nr[1] = anon active pages to scan
* nr[2] = file inactive pages to scan; nr[3] = file active pages to scan
*/
static void get_scan_count(struct mem_cgroup_zone *mz, struct scan_control *sc,
unsigned long *nr, int priority)
Expand Down

0 comments on commit be7bd59

Please sign in to comment.