writeback: account per-bdi accumulated written pages
Introduce the BDI_WRITTEN counter. It will be used for estimating the bdi's write bandwidth. Peter Zijlstra <a.p.zijlstra@chello.nl>: Move BDI_WRITTEN accounting into __bdi_writeout_inc(). This will cover and fix fuse, which only calls bdi_writeout_inc(). CC: Michael Rubin <mrubin@google.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
This commit is contained in:
@@ -219,6 +219,7 @@ int dirty_bytes_handler(struct ctl_table *table, int write,
|
||||
*/
|
||||
static inline void __bdi_writeout_inc(struct backing_dev_info *bdi)
|
||||
{
|
||||
__inc_bdi_stat(bdi, BDI_WRITTEN);
|
||||
__prop_inc_percpu_max(&vm_completions, &bdi->completions,
|
||||
bdi->max_prop_frac);
|
||||
}
|
||||
|
Reference in New Issue
Block a user