diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2011-08-16 15:37:14 -0400 |
---|---|---|
committer | Wu Fengguang <fengguang.wu@intel.com> | 2011-08-19 10:42:07 -0400 |
commit | bb0822954aab7d23a3f902c2a103ee0242f6046e (patch) | |
tree | 3049962f0ecc05eea4b2b4ef5480b6708bc74ce7 /include | |
parent | 93ee7a9340d64f20295aacc3fb6a22b759323280 (diff) |
squeeze max-pause area and drop pass-good area
Revert the pass-good area introduced in ffd1f609ab10 ("writeback:
introduce max-pause and pass-good dirty limits") and make the max-pause
area smaller and safe.
This fixes ~30% performance regression in the ext3 data=writeback
fio_mmap_randwrite_64k/fio_mmap_randrw_64k test cases, where there are
12 JBOD disks, on each disk runs 8 concurrent tasks doing reads+writes.
Using deadline scheduler also has a regression, but not that big as CFQ,
so this suggests we have some write starvation.
The test logs show that
- the disks are sometimes under utilized
- global dirty pages sometimes rush high to the pass-good area for
several hundred seconds, while in the mean time some bdi dirty pages
drop to very low value (bdi_dirty << bdi_thresh). Then suddenly the
global dirty pages dropped under global dirty threshold and bdi_dirty
rush very high (for example, 2 times higher than bdi_thresh). During
which time balance_dirty_pages() is not called at all.
So the problems are
1) The random writes progress so slow that they break the assumption of
the max-pause logic that "8 pages per 200ms is typically more than
enough to curb heavy dirtiers".
2) The max-pause logic ignored task_bdi_thresh and thus opens the possibility
for some bdi's to over dirty pages, leading to (bdi_dirty >> bdi_thresh)
and then (bdi_thresh >> bdi_dirty) for others.
3) The higher max-pause/pass-good thresholds somehow leads to the bad
swing of dirty pages.
The fix is to allow the task to slightly dirty over task_bdi_thresh, but
no way to exceed bdi_dirty and/or global dirty_thresh.
Tests show that it fixed the JBOD regression completely (both behavior
and performance), while still being able to cut down large pause times
in balance_dirty_pages() for single-disk cases.
Reported-by: Li Shaohua <shaohua.li@intel.com>
Tested-by: Li Shaohua <shaohua.li@intel.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/writeback.h | 11 |
1 files changed, 0 insertions, 11 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 |