diff options
author | Jamie Liu <jamieliu@google.com> | 2014-12-10 18:43:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 20:41:06 -0500 |
commit | 1da58ee2a0279a1b0afd3248396de5659b8cf95b (patch) | |
tree | 1c0aec90fdb49d4caf7a5de3da700e76a4e41c46 /mm | |
parent | ab1f306fa92f4d875c8f0b9e9f90e27ca8e7b37b (diff) |
mm: vmscan: count only dirty pages as congested
shrink_page_list() counts all pages with a mapping, including clean pages,
toward nr_congested if they're on a write-congested BDI.
shrink_inactive_list() then sets ZONE_CONGESTED if nr_dirty ==
nr_congested. Fix this apples-to-oranges comparison by only counting
pages for nr_congested if they count for nr_dirty.
Signed-off-by: Jamie Liu <jamieliu@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Greg Thelen <gthelen@google.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 59605b7c9970..53157e157061 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -874,7 +874,8 @@ static unsigned long shrink_page_list(struct list_head *page_list, | |||
874 | * end of the LRU a second time. | 874 | * end of the LRU a second time. |
875 | */ | 875 | */ |
876 | mapping = page_mapping(page); | 876 | mapping = page_mapping(page); |
877 | if ((mapping && bdi_write_congested(mapping->backing_dev_info)) || | 877 | if (((dirty || writeback) && mapping && |
878 | bdi_write_congested(mapping->backing_dev_info)) || | ||
878 | (writeback && PageReclaim(page))) | 879 | (writeback && PageReclaim(page))) |
879 | nr_congested++; | 880 | nr_congested++; |
880 | 881 | ||