Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356607
b: refs/heads/master
c: 0e50ce3
h: refs/heads/master
i:
  356605: 8e49dc1
  356603: d4021e7
  356599: 9b85dd2
  356591: 6808835
  356575: d7d0fcf
  356543: 8863ea7
  356479: d882709
  356351: 0d2f364
v: v3
  • Loading branch information
Minchan Kim authored and Linus Torvalds committed Feb 24, 2013
1 parent 378b58d commit 818a787
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: 00ef2d2f84babb9b209f0fc003bc490c6bf1e6ef
refs/heads/master: 0e50ce3b50fb4ffc38c98fe7622361da4d0808c1
15 changes: 10 additions & 5 deletions trunk/mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2194,6 +2194,13 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
if (sc->nr_reclaimed >= sc->nr_to_reclaim)
goto out;

/*
* If we're getting trouble reclaiming, start doing
* writepage even in laptop mode.
*/
if (sc->priority < DEF_PRIORITY - 2)
sc->may_writepage = 1;

/*
* Try to write back as many pages as we just scanned. This
* tends to cause slow streaming writers to write data to the
Expand Down Expand Up @@ -2765,12 +2772,10 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order,
}

/*
* If we've done a decent amount of scanning and
* the reclaim ratio is low, start doing writepage
* even in laptop mode
* If we're getting trouble reclaiming, start doing
* writepage even in laptop mode.
*/
if (total_scanned > SWAP_CLUSTER_MAX * 2 &&
total_scanned > sc.nr_reclaimed + sc.nr_reclaimed / 2)
if (sc.priority < DEF_PRIORITY - 2)
sc.may_writepage = 1;

if (zone->all_unreclaimable) {
Expand Down

0 comments on commit 818a787

Please sign in to comment.