diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 2585349469e0..d1ba46441053 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -485,6 +485,7 @@ static void balance_dirty_pages(struct address_space *mapping) | |||
485 | unsigned long bdi_thresh; | 485 | unsigned long bdi_thresh; |
486 | unsigned long pages_written = 0; | 486 | unsigned long pages_written = 0; |
487 | unsigned long write_chunk = sync_writeback_pages(); | 487 | unsigned long write_chunk = sync_writeback_pages(); |
488 | unsigned long pause = 1; | ||
488 | 489 | ||
489 | struct backing_dev_info *bdi = mapping->backing_dev_info; | 490 | struct backing_dev_info *bdi = mapping->backing_dev_info; |
490 | 491 | ||
@@ -561,7 +562,15 @@ static void balance_dirty_pages(struct address_space *mapping) | |||
561 | if (pages_written >= write_chunk) | 562 | if (pages_written >= write_chunk) |
562 | break; /* We've done our duty */ | 563 | break; /* We've done our duty */ |
563 | 564 | ||
564 | schedule_timeout_interruptible(1); | 565 | schedule_timeout_interruptible(pause); |
566 | |||
567 | /* | ||
568 | * Increase the delay for each loop, up to our previous | ||
569 | * default of taking a 100ms nap. | ||
570 | */ | ||
571 | pause <<= 1; | ||
572 | if (pause > HZ / 10) | ||
573 | pause = HZ / 10; | ||
565 | } | 574 | } |
566 | 575 | ||
567 | if (bdi_nr_reclaimable + bdi_nr_writeback < bdi_thresh && | 576 | if (bdi_nr_reclaimable + bdi_nr_writeback < bdi_thresh && |