aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_proc.c
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2013-12-20 11:22:13 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-07-10 18:35:13 +0200
commitad3fee790088d36ad862e31535b5b99c25adeef4 (patch)
tree916a5c23cf57283f9f6a5abf8418364c52249ad9 /drivers/block/drbd/drbd_proc.c
parentdrbd: add caching oldest request pointers for replication stages (diff)
downloadlinux-dev-ad3fee790088d36ad862e31535b5b99c25adeef4.tar.xz
linux-dev-ad3fee790088d36ad862e31535b5b99c25adeef4.zip
drbd: improve throttling decisions of background resynchronisation
Background resynchronisation does some "side-stepping", or throttles itself, if it detects application IO activity, and the current resync rate estimate is above the configured "cmin-rate". What was not detected: if there is no application IO, because it blocks on activity log transactions. Introduce a new atomic_t ap_actlog_cnt, tracking such blocked requests, and count non-zero as application IO activity. This counter is exposed at proc_details level 2 and above. Also make sure to release the currently locked resync extent if we side-step due to such voluntary throttling. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_proc.c')
-rw-r--r--drivers/block/drbd/drbd_proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
index 9059d7bf8a36..06e6147c7601 100644
--- a/drivers/block/drbd/drbd_proc.c
+++ b/drivers/block/drbd/drbd_proc.c
@@ -335,6 +335,9 @@ static int drbd_seq_show(struct seq_file *seq, void *v)
lc_seq_printf_stats(seq, device->act_log);
put_ldev(device);
}
+
+ if (proc_details >= 2)
+ seq_printf(seq, "\tblocked on activity log: %d\n", atomic_read(&device->ap_actlog_cnt));
}
rcu_read_unlock();