diff options
| author | Olav Haugan <ohaugan@codeaurora.org> | 2013-11-04 10:46:16 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:03:25 -0700 |
| commit | 80370b5f592b4ee469f23447e1517cd78d0860ef (patch) | |
| tree | e0303b0dff93a000a77cc8249aef62f5fc9142c1 /mm/vmscan.c | |
| parent | f4fbcaf9f770d7ad91bb55e4a5e9a8f7761f0c1e (diff) | |
mm: vmscan: Move pages that fail swapout to LRU active list
Move pages that fail swapout to the LRU active list to reduce
pressure on swap device when swapping out is already failing.
This helps when using a pseudo swap device such as zram which
starts failing when memory is low.
Change-Id: Ib136cd0a744378aa93d837a24b9143ee818c80b3
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'mm/vmscan.c')
| -rw-r--r-- | mm/vmscan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 0c56f6a812bc..3b951836c6c8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -636,6 +636,8 @@ static pageout_t pageout(struct page *page, struct address_space *mapping, if (!PageWriteback(page)) { /* synchronous write or broken a_ops? */ ClearPageReclaim(page); + if (PageError(page)) + return PAGE_ACTIVATE; } trace_mm_vmscan_writepage(page, trace_reclaim_flags(page)); inc_zone_page_state(page, NR_VMSCAN_WRITE); |
