diff options
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 396ecee281d0..606d0bb46091 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -2195,6 +2195,13 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, | |||
2195 | goto out; | 2195 | goto out; |
2196 | 2196 | ||
2197 | /* | 2197 | /* |
2198 | * If we're getting trouble reclaiming, start doing | ||
2199 | * writepage even in laptop mode. | ||
2200 | */ | ||
2201 | if (sc->priority < DEF_PRIORITY - 2) | ||
2202 | sc->may_writepage = 1; | ||
2203 | |||
2204 | /* | ||
2198 | * Try to write back as many pages as we just scanned. This | 2205 | * Try to write back as many pages as we just scanned. This |
2199 | * tends to cause slow streaming writers to write data to the | 2206 | * tends to cause slow streaming writers to write data to the |
2200 | * disk smoothly, at the dirtying rate, which is nice. But | 2207 | * disk smoothly, at the dirtying rate, which is nice. But |
@@ -2765,12 +2772,10 @@ loop_again: | |||
2765 | } | 2772 | } |
2766 | 2773 | ||
2767 | /* | 2774 | /* |
2768 | * If we've done a decent amount of scanning and | 2775 | * If we're getting trouble reclaiming, start doing |
2769 | * the reclaim ratio is low, start doing writepage | 2776 | * writepage even in laptop mode. |
2770 | * even in laptop mode | ||
2771 | */ | 2777 | */ |
2772 | if (total_scanned > SWAP_CLUSTER_MAX * 2 && | 2778 | if (sc.priority < DEF_PRIORITY - 2) |
2773 | total_scanned > sc.nr_reclaimed + sc.nr_reclaimed / 2) | ||
2774 | sc.may_writepage = 1; | 2779 | sc.may_writepage = 1; |
2775 | 2780 | ||
2776 | if (zone->all_unreclaimable) { | 2781 | if (zone->all_unreclaimable) { |