]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - mm/page-writeback.c
writeback: make __wb_calc_thresh() take dirty_throttle_control
authorTejun Heo <tj@kernel.org>
Fri, 22 May 2015 22:23:25 +0000 (18:23 -0400)
committerJens Axboe <axboe@fb.com>
Tue, 2 Jun 2015 14:38:13 +0000 (08:38 -0600)
commitb1cbc6d40c85639d405fee37c7bb688c3bf468d6
tree3fade9185da49c4ba9d54fd77f5501d514b8b447
parent970fb01ad3a773b5612a9bba6b366abcefc18eaf
writeback: make __wb_calc_thresh() take dirty_throttle_control

wb_calc_thresh() calculates wb_thresh by scaling thresh according to
the wb's portion in the system-wide write bandwidth.  cgroup writeback
support would need to calculate wb_thresh against memcg domain too.
This patch renames wb_calc_thresh() to __wb_calc_thresh() and makes it
take dirty_throttle_control so that the function can later be updated
to calculate against different domains according to
dirty_throttle_control.

wb_calc_thresh() is now a thin wrapper around __wb_calc_thresh().

v2: The original version was incorrectly scaling dtc->dirty instead of
    dtc->thresh.  This was due to the extremely confusing function and
    variable names.  Added a rename patch and fixed this one.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Greg Thelen <gthelen@google.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
mm/page-writeback.c