]> git.baikalelectronics.ru Git - kernel.git/commit
writeback: comment on the bdi dirty threshold
authorWu Fengguang <fengguang.wu@intel.com>
Wed, 23 Nov 2011 17:44:41 +0000 (11:44 -0600)
committerWu Fengguang <fengguang.wu@intel.com>
Thu, 8 Dec 2011 02:49:20 +0000 (10:49 +0800)
commit10b05a138318be06e1635c64e675450ac5f62a8e
tree64d6bf0e86b7d256621420d2266d5c7c29bb5d50
parentf5245f9e59fd42f5f51a4e839551566728f6103c
writeback: comment on the bdi dirty threshold

We do "floating proportions" to let active devices to grow its target
share of dirty pages and stalled/inactive devices to decrease its target
share over time.

It works well except in the case of "an inactive disk suddenly goes
busy", where the initial target share may be too small. To mitigate
this, bdi_position_ratio() has the below line to raise a small
bdi_thresh when it's safe to do so, so that the disk be feed with enough
dirty pages for efficient IO and in turn fast rampup of bdi_thresh:

        bdi_thresh = max(bdi_thresh, (limit - dirty) / 8);

balance_dirty_pages() normally does negative feedback control which
adjusts ratelimit to balance the bdi dirty pages around the target.
In some extreme cases when that is not enough, it will have to block
the tasks completely until the bdi dirty pages drop below bdi_thresh.

Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
mm/page-writeback.c