diff options
-rw-r--r-- | mm/vmscan.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 4898daf074cf..bf4778479e3a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -761,9 +761,15 @@ static unsigned long shrink_page_list(struct list_head *page_list, | |||
761 | if (dirty && !writeback) | 761 | if (dirty && !writeback) |
762 | nr_unqueued_dirty++; | 762 | nr_unqueued_dirty++; |
763 | 763 | ||
764 | /* Treat this page as congested if underlying BDI is */ | 764 | /* |
765 | * Treat this page as congested if the underlying BDI is or if | ||
766 | * pages are cycling through the LRU so quickly that the | ||
767 | * pages marked for immediate reclaim are making it to the | ||
768 | * end of the LRU a second time. | ||
769 | */ | ||
765 | mapping = page_mapping(page); | 770 | mapping = page_mapping(page); |
766 | if (mapping && bdi_write_congested(mapping->backing_dev_info)) | 771 | if ((mapping && bdi_write_congested(mapping->backing_dev_info)) || |
772 | (writeback && PageReclaim(page))) | ||
767 | nr_congested++; | 773 | nr_congested++; |
768 | 774 | ||
769 | /* | 775 | /* |