Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320857
b: refs/heads/master
c: e62e384
h: refs/heads/master
i:
  320855: 6039115
v: v3
  • Loading branch information
Michal Hocko authored and Linus Torvalds committed Aug 1, 2012
1 parent 1a8f53e commit 1d3d1ae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ad3d901bbcfb15a5e4690e55350db0899095a68
refs/heads/master: e62e384e9da8d9a0c599795464a7e76fd490931c
23 changes: 20 additions & 3 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,26 @@ static unsigned long shrink_page_list(struct list_head *page_list,
(PageSwapCache(page) && (sc->gfp_mask & __GFP_IO));

if (PageWriteback(page)) {
nr_writeback++;
unlock_page(page);
goto keep;
/*
* memcg doesn't have any dirty pages throttling so we
* could easily OOM just because too many pages are in
* writeback from reclaim and there is nothing else to
* reclaim.
*
* Check may_enter_fs, certainly because a loop driver
* thread might enter reclaim, and deadlock if it waits
* on a page for which it is needed to do the write
* (loop masks off __GFP_IO|__GFP_FS for this reason);
* but more thought would probably show more reasons.
*/
if (!global_reclaim(sc) && PageReclaim(page) &&
may_enter_fs)
wait_on_page_writeback(page);
else {
nr_writeback++;
unlock_page(page);
goto keep;
}
}

references = page_check_references(page, sc);
Expand Down

0 comments on commit 1d3d1ae

Please sign in to comment.