aboutsummaryrefslogtreecommitdiffstats
path: root/mm/backing-dev.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-05-24 12:59:11 -0400
committerFengguang Wu <fengguang.wu@intel.com>2012-06-08 19:37:56 -0400
commiteb608e3a344b3af21300360fcf868f8b4e808a8e (patch)
tree34e36bc81c8b7bf459301e1eda96062c40bccbb3 /mm/backing-dev.c
parente78d4833c03e28205b3d983f0c4e586ee34785fd (diff)
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>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r--mm/backing-dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index dd8e2aafb07e..3387aea11209 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -677,7 +677,7 @@ int bdi_init(struct backing_dev_info *bdi)
677 677
678 bdi->min_ratio = 0; 678 bdi->min_ratio = 0;
679 bdi->max_ratio = 100; 679 bdi->max_ratio = 100;
680 bdi->max_prop_frac = PROP_FRAC_BASE; 680 bdi->max_prop_frac = FPROP_FRAC_BASE;
681 spin_lock_init(&bdi->wb_lock); 681 spin_lock_init(&bdi->wb_lock);
682 INIT_LIST_HEAD(&bdi->bdi_list); 682 INIT_LIST_HEAD(&bdi->bdi_list);
683 INIT_LIST_HEAD(&bdi->work_list); 683 INIT_LIST_HEAD(&bdi->work_list);
@@ -700,7 +700,7 @@ int bdi_init(struct backing_dev_info *bdi)
700 bdi->write_bandwidth = INIT_BW; 700 bdi->write_bandwidth = INIT_BW;
701 bdi->avg_write_bandwidth = INIT_BW; 701 bdi->avg_write_bandwidth = INIT_BW;
702 702
703 err = prop_local_init_percpu(&bdi->completions); 703 err = fprop_local_init_percpu(&bdi->completions);
704 704
705 if (err) { 705 if (err) {
706err: 706err:
@@ -744,7 +744,7 @@ void bdi_destroy(struct backing_dev_info *bdi)
744 for (i = 0; i < NR_BDI_STAT_ITEMS; i++) 744 for (i = 0; i < NR_BDI_STAT_ITEMS; i++)
745 percpu_counter_destroy(&bdi->bdi_stat[i]); 745 percpu_counter_destroy(&bdi->bdi_stat[i]);
746 746
747 prop_local_destroy_percpu(&bdi->completions); 747 fprop_local_destroy_percpu(&bdi->completions);
748} 748}
749EXPORT_SYMBOL(bdi_destroy); 749EXPORT_SYMBOL(bdi_destroy);
750 750