提交 af6a3113 编写于 作者: W Wu Fengguang

writeback: add bg_threshold parameter to __bdi_update_bandwidth()

No behavior change.
Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
上级 6c14ae1e
...@@ -675,7 +675,7 @@ static inline bool over_bground_thresh(void) ...@@ -675,7 +675,7 @@ static inline bool over_bground_thresh(void)
static void wb_update_bandwidth(struct bdi_writeback *wb, static void wb_update_bandwidth(struct bdi_writeback *wb,
unsigned long start_time) 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);
} }
/* /*
......
...@@ -143,6 +143,7 @@ unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, ...@@ -143,6 +143,7 @@ unsigned long bdi_dirty_limit(struct backing_dev_info *bdi,
void __bdi_update_bandwidth(struct backing_dev_info *bdi, void __bdi_update_bandwidth(struct backing_dev_info *bdi,
unsigned long thresh, unsigned long thresh,
unsigned long bg_thresh,
unsigned long dirty, unsigned long dirty,
unsigned long bdi_thresh, unsigned long bdi_thresh,
unsigned long bdi_dirty, unsigned long bdi_dirty,
......
...@@ -779,6 +779,7 @@ static void global_update_bandwidth(unsigned long thresh, ...@@ -779,6 +779,7 @@ static void global_update_bandwidth(unsigned long thresh,
void __bdi_update_bandwidth(struct backing_dev_info *bdi, void __bdi_update_bandwidth(struct backing_dev_info *bdi,
unsigned long thresh, unsigned long thresh,
unsigned long bg_thresh,
unsigned long dirty, unsigned long dirty,
unsigned long bdi_thresh, unsigned long bdi_thresh,
unsigned long bdi_dirty, unsigned long bdi_dirty,
...@@ -815,6 +816,7 @@ void __bdi_update_bandwidth(struct backing_dev_info *bdi, ...@@ -815,6 +816,7 @@ void __bdi_update_bandwidth(struct backing_dev_info *bdi,
static void bdi_update_bandwidth(struct backing_dev_info *bdi, static void bdi_update_bandwidth(struct backing_dev_info *bdi,
unsigned long thresh, unsigned long thresh,
unsigned long bg_thresh,
unsigned long dirty, unsigned long dirty,
unsigned long bdi_thresh, unsigned long bdi_thresh,
unsigned long bdi_dirty, unsigned long bdi_dirty,
...@@ -823,8 +825,8 @@ static void bdi_update_bandwidth(struct backing_dev_info *bdi, ...@@ -823,8 +825,8 @@ static void bdi_update_bandwidth(struct backing_dev_info *bdi,
if (time_is_after_eq_jiffies(bdi->bw_time_stamp + BANDWIDTH_INTERVAL)) if (time_is_after_eq_jiffies(bdi->bw_time_stamp + BANDWIDTH_INTERVAL))
return; return;
spin_lock(&bdi->wb.list_lock); spin_lock(&bdi->wb.list_lock);
__bdi_update_bandwidth(bdi, thresh, dirty, bdi_thresh, bdi_dirty, __bdi_update_bandwidth(bdi, thresh, bg_thresh, dirty,
start_time); bdi_thresh, bdi_dirty, start_time);
spin_unlock(&bdi->wb.list_lock); spin_unlock(&bdi->wb.list_lock);
} }
...@@ -912,8 +914,9 @@ static void balance_dirty_pages(struct address_space *mapping, ...@@ -912,8 +914,9 @@ static void balance_dirty_pages(struct address_space *mapping,
if (!bdi->dirty_exceeded) if (!bdi->dirty_exceeded)
bdi->dirty_exceeded = 1; bdi->dirty_exceeded = 1;
bdi_update_bandwidth(bdi, dirty_thresh, nr_dirty, bdi_update_bandwidth(bdi, dirty_thresh, background_thresh,
bdi_thresh, bdi_dirty, start_time); nr_dirty, bdi_thresh, bdi_dirty,
start_time);
/* Note: nr_reclaimable denotes nr_dirty + nr_unstable. /* Note: nr_reclaimable denotes nr_dirty + nr_unstable.
* Unstable writes are a feature of certain networked * Unstable writes are a feature of certain networked
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册