lkml.org 
[lkml]   [2011]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 12/18] writeback: balanced_rate cannot exceed write bandwidth
    Add an upper limit to balanced_rate according to the below inequality.
    This filters out some rare but huge singular points, which at least
    enables more readable gnuplot figures.

    When there are N dd dirtiers,

    balanced_dirty_ratelimit = write_bw / N

    So it holds that

    balanced_dirty_ratelimit <= write_bw

    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
    ---
    mm/page-writeback.c | 5 +++++
    1 file changed, 5 insertions(+)

    --- linux-next.orig/mm/page-writeback.c 2011-08-29 19:14:22.000000000 +0800
    +++ linux-next/mm/page-writeback.c 2011-08-29 19:20:36.000000000 +0800
    @@ -828,6 +828,11 @@ static void bdi_update_dirty_ratelimit(s
    */
    balanced_dirty_ratelimit = div_u64((u64)task_ratelimit * write_bw,
    dirty_rate | 1);
    + /*
    + * balanced_dirty_ratelimit ~= (write_bw / N) <= write_bw
    + */
    + if (unlikely(balanced_dirty_ratelimit > write_bw))
    + balanced_dirty_ratelimit = write_bw;

    /*
    * We could safely do this and return immediately:



    \
     
     \ /
      Last update: 2011-09-04 04:17    [W:0.029 / U:0.456 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site