The post-2.6.8 recent tweaks to the page writeback thresholding code seems to
be doing the wrong thing for small unmapped_ratios - nathans had a few
problems with it. The problem it was trying to fix is minor and fairly
theoretical anyway, so back it out to the old code.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
if (dirty_ratio < 5)
dirty_ratio = 5;
- /*
- * Keep the ratio between dirty_ratio and background_ratio roughly
- * what the sysctls are after dirty_ratio has been scaled (above).
- */
- background_ratio = dirty_background_ratio * dirty_ratio/vm_dirty_ratio;
+ background_ratio = dirty_background_ratio;
+ if (background_ratio >= dirty_ratio)
+ background_ratio = dirty_ratio / 2;
background = (background_ratio * total_pages) / 100;
dirty = (dirty_ratio * total_pages) / 100;