block: Convert BDI proportion calculations to flexible proportions
Convert calculations of proportion of writeback each bdi does to new flexible proportion code. That allows us to use aging period of fixed wallclock time which gives better proportion estimates given the hugely varying throughput of different devices. Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
This commit is contained in:
@ -677,7 +677,7 @@ int bdi_init(struct backing_dev_info *bdi)
|
||||
|
||||
bdi->min_ratio = 0;
|
||||
bdi->max_ratio = 100;
|
||||
bdi->max_prop_frac = PROP_FRAC_BASE;
|
||||
bdi->max_prop_frac = FPROP_FRAC_BASE;
|
||||
spin_lock_init(&bdi->wb_lock);
|
||||
INIT_LIST_HEAD(&bdi->bdi_list);
|
||||
INIT_LIST_HEAD(&bdi->work_list);
|
||||
@ -700,7 +700,7 @@ int bdi_init(struct backing_dev_info *bdi)
|
||||
bdi->write_bandwidth = INIT_BW;
|
||||
bdi->avg_write_bandwidth = INIT_BW;
|
||||
|
||||
err = prop_local_init_percpu(&bdi->completions);
|
||||
err = fprop_local_init_percpu(&bdi->completions);
|
||||
|
||||
if (err) {
|
||||
err:
|
||||
@ -744,7 +744,7 @@ void bdi_destroy(struct backing_dev_info *bdi)
|
||||
for (i = 0; i < NR_BDI_STAT_ITEMS; i++)
|
||||
percpu_counter_destroy(&bdi->bdi_stat[i]);
|
||||
|
||||
prop_local_destroy_percpu(&bdi->completions);
|
||||
fprop_local_destroy_percpu(&bdi->completions);
|
||||
}
|
||||
EXPORT_SYMBOL(bdi_destroy);
|
||||
|
||||
|
Reference in New Issue
Block a user