]> git.hungrycats.org Git - linux/commitdiff
[PATCH] revert writeback threshold changes
authorAndrew Morton <akpm@osdl.org>
Wed, 13 Oct 2004 14:26:13 +0000 (07:26 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 13 Oct 2004 14:26:13 +0000 (07:26 -0700)
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>
mm/page-writeback.c

index ab9fb2dfbece2aa1e2b5e6e0dfd651120ec2a8be..343998d46bb03344d27845a79b6c20096e1508ca 100644 (file)
@@ -153,11 +153,9 @@ get_dirty_limits(struct writeback_state *wbs, long *pbackground, long *pdirty)
        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;