Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164392
b: refs/heads/master
c: de2e756
h: refs/heads/master
v: v3
  • Loading branch information
Minchan Kim authored and Linus Torvalds committed Sep 22, 2009
1 parent c38f9cb commit 5a9ef6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: adea02a1bea71a508da32c04d715485a1fe62029
refs/heads/master: de2e7567c7ddf24f0ca80010163ed10da66a14e2
10 changes: 10 additions & 0 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,16 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
/* Check that we have not crossed a zone boundary. */
if (unlikely(page_zone_id(cursor_page) != zone_id))
continue;

/*
* If we don't have enough swap space, reclaiming of
* anon page which don't already have a swap slot is
* pointless.
*/
if (nr_swap_pages <= 0 && PageAnon(cursor_page) &&
!PageSwapCache(cursor_page))
continue;

if (__isolate_lru_page(cursor_page, mode, file) == 0) {
list_move(&cursor_page->lru, dst);
mem_cgroup_del_lru(cursor_page);
Expand Down

0 comments on commit 5a9ef6e

Please sign in to comment.