lkml.org 
[lkml]   [2011]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 03/11] writeback: add bg_threshold parameter to __bdi_update_bandwidth()
    No behavior change.

    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
    ---
    fs/fs-writeback.c | 2 +-
    include/linux/writeback.h | 1 +
    mm/page-writeback.c | 11 +++++++----
    3 files changed, 9 insertions(+), 5 deletions(-)

    --- linux-next.orig/mm/page-writeback.c 2011-10-03 20:44:55.000000000 +0800
    +++ linux-next/mm/page-writeback.c 2011-10-03 20:46:17.000000000 +0800
    @@ -779,6 +779,7 @@ static void global_update_bandwidth(unsi

    void __bdi_update_bandwidth(struct backing_dev_info *bdi,
    unsigned long thresh,
    + unsigned long bg_thresh,
    unsigned long dirty,
    unsigned long bdi_thresh,
    unsigned long bdi_dirty,
    @@ -815,6 +816,7 @@ snapshot:

    static void bdi_update_bandwidth(struct backing_dev_info *bdi,
    unsigned long thresh,
    + unsigned long bg_thresh,
    unsigned long dirty,
    unsigned long bdi_thresh,
    unsigned long bdi_dirty,
    @@ -823,8 +825,8 @@ static void bdi_update_bandwidth(struct
    if (time_is_after_eq_jiffies(bdi->bw_time_stamp + BANDWIDTH_INTERVAL))
    return;
    spin_lock(&bdi->wb.list_lock);
    - __bdi_update_bandwidth(bdi, thresh, dirty, bdi_thresh, bdi_dirty,
    - start_time);
    + __bdi_update_bandwidth(bdi, thresh, bg_thresh, dirty,
    + bdi_thresh, bdi_dirty, start_time);
    spin_unlock(&bdi->wb.list_lock);
    }

    @@ -912,8 +914,9 @@ static void balance_dirty_pages(struct a
    if (!bdi->dirty_exceeded)
    bdi->dirty_exceeded = 1;

    - bdi_update_bandwidth(bdi, dirty_thresh, nr_dirty,
    - bdi_thresh, bdi_dirty, start_time);
    + bdi_update_bandwidth(bdi, dirty_thresh, background_thresh,
    + nr_dirty, bdi_thresh, bdi_dirty,
    + start_time);

    /* Note: nr_reclaimable denotes nr_dirty + nr_unstable.
    * Unstable writes are a feature of certain networked
    --- linux-next.orig/fs/fs-writeback.c 2011-10-03 20:44:51.000000000 +0800
    +++ linux-next/fs/fs-writeback.c 2011-10-03 20:45:27.000000000 +0800
    @@ -675,7 +675,7 @@ static inline bool over_bground_thresh(v
    static void wb_update_bandwidth(struct bdi_writeback *wb,
    unsigned long start_time)
    {
    - __bdi_update_bandwidth(wb->bdi, 0, 0, 0, 0, start_time);
    + __bdi_update_bandwidth(wb->bdi, 0, 0, 0, 0, 0, start_time);
    }

    /*
    --- linux-next.orig/include/linux/writeback.h 2011-10-03 20:44:51.000000000 +0800
    +++ linux-next/include/linux/writeback.h 2011-10-03 20:45:27.000000000 +0800
    @@ -143,6 +143,7 @@ unsigned long bdi_dirty_limit(struct bac

    void __bdi_update_bandwidth(struct backing_dev_info *bdi,
    unsigned long thresh,
    + unsigned long bg_thresh,
    unsigned long dirty,
    unsigned long bdi_thresh,
    unsigned long bdi_dirty,



    \
     
     \ /
      Last update: 2011-10-03 15:51    [W:0.025 / U:59.380 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site