Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164287
b: refs/heads/master
c: 87c6a9b
h: refs/heads/master
i:
  164285: 7aeb80f
  164283: e7841df
  164279: 3112dea
  164271: 039f0a0
  164255: b4debc9
  164223: 9e9be00
v: v3
  • Loading branch information
Jens Axboe committed Sep 21, 2009
1 parent 742fd3a commit 3d99317
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 3542a5c0de3d5b33227214a692bf9b12e249078e
refs/heads/master: 87c6a9b253520b66e7f5e8f67a37a701eaa51cee
11 changes: 10 additions & 1 deletion trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ static void balance_dirty_pages(struct address_space *mapping)
unsigned long bdi_thresh;
unsigned long pages_written = 0;
unsigned long write_chunk = sync_writeback_pages();
unsigned long pause = 1;

struct backing_dev_info *bdi = mapping->backing_dev_info;

Expand Down Expand Up @@ -561,7 +562,15 @@ static void balance_dirty_pages(struct address_space *mapping)
if (pages_written >= write_chunk)
break; /* We've done our duty */

schedule_timeout_interruptible(1);
schedule_timeout_interruptible(pause);

/*
* Increase the delay for each loop, up to our previous
* default of taking a 100ms nap.
*/
pause <<= 1;
if (pause > HZ / 10)
pause = HZ / 10;
}

if (bdi_nr_reclaimable + bdi_nr_writeback < bdi_thresh &&
Expand Down

0 comments on commit 3d99317

Please sign in to comment.