diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-25 13:40:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-25 13:40:12 -0400 |
commit | e33f2d238e2e53e264c758c0849423a9308eb63e (patch) | |
tree | 8137292b733fe0f8d10b8d004f2c58a9740c829b | |
parent | be5378f3baabb5667508c42c56b4281f967d6861 (diff) | |
parent | bb0822954aab7d23a3f902c2a103ee0242f6046e (diff) |
Merge branch 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback
* 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback:
squeeze max-pause area and drop pass-good area
-rw-r--r-- | include/linux/writeback.h | 11 | ||||
-rw-r--r-- | mm/page-writeback.c | 15 |
2 files changed, 2 insertions, 24 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index f1bfa12ea246..2b8963ff0f35 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -12,15 +12,6 @@ | |||
12 | * | 12 | * |
13 | * (thresh - thresh/DIRTY_FULL_SCOPE, thresh) | 13 | * (thresh - thresh/DIRTY_FULL_SCOPE, thresh) |
14 | * | 14 | * |
15 | * The 1/16 region above the global dirty limit will be put to maximum pauses: | ||
16 | * | ||
17 | * (limit, limit + limit/DIRTY_MAXPAUSE_AREA) | ||
18 | * | ||
19 | * The 1/16 region above the max-pause region, dirty exceeded bdi's will be put | ||
20 | * to loops: | ||
21 | * | ||
22 | * (limit + limit/DIRTY_MAXPAUSE_AREA, limit + limit/DIRTY_PASSGOOD_AREA) | ||
23 | * | ||
24 | * Further beyond, all dirtier tasks will enter a loop waiting (possibly long | 15 | * Further beyond, all dirtier tasks will enter a loop waiting (possibly long |
25 | * time) for the dirty pages to drop, unless written enough pages. | 16 | * time) for the dirty pages to drop, unless written enough pages. |
26 | * | 17 | * |
@@ -31,8 +22,6 @@ | |||
31 | */ | 22 | */ |
32 | #define DIRTY_SCOPE 8 | 23 | #define DIRTY_SCOPE 8 |
33 | #define DIRTY_FULL_SCOPE (DIRTY_SCOPE / 2) | 24 | #define DIRTY_FULL_SCOPE (DIRTY_SCOPE / 2) |
34 | #define DIRTY_MAXPAUSE_AREA 16 | ||
35 | #define DIRTY_PASSGOOD_AREA 8 | ||
36 | 25 | ||
37 | /* | 26 | /* |
38 | * 4MB minimal write chunk size | 27 | * 4MB minimal write chunk size |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index d1960744f881..0e309cd1b5b9 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -754,21 +754,10 @@ static void balance_dirty_pages(struct address_space *mapping, | |||
754 | * 200ms is typically more than enough to curb heavy dirtiers; | 754 | * 200ms is typically more than enough to curb heavy dirtiers; |
755 | * (b) the pause time limit makes the dirtiers more responsive. | 755 | * (b) the pause time limit makes the dirtiers more responsive. |
756 | */ | 756 | */ |
757 | if (nr_dirty < dirty_thresh + | 757 | if (nr_dirty < dirty_thresh && |
758 | dirty_thresh / DIRTY_MAXPAUSE_AREA && | 758 | bdi_dirty < (task_bdi_thresh + bdi_thresh) / 2 && |
759 | time_after(jiffies, start_time + MAX_PAUSE)) | 759 | time_after(jiffies, start_time + MAX_PAUSE)) |
760 | break; | 760 | break; |
761 | /* | ||
762 | * pass-good area. When some bdi gets blocked (eg. NFS server | ||
763 | * not responding), or write bandwidth dropped dramatically due | ||
764 | * to concurrent reads, or dirty threshold suddenly dropped and | ||
765 | * the dirty pages cannot be brought down anytime soon (eg. on | ||
766 | * slow USB stick), at least let go of the good bdi's. | ||
767 | */ | ||
768 | if (nr_dirty < dirty_thresh + | ||
769 | dirty_thresh / DIRTY_PASSGOOD_AREA && | ||
770 | bdi_dirty < bdi_thresh) | ||
771 | break; | ||
772 | 761 | ||
773 | /* | 762 | /* |
774 | * Increase the delay for each loop, up to our previous | 763 | * Increase the delay for each loop, up to our previous |