diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2013-12-20 10:22:13 (GMT) |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-07-10 16:35:13 (GMT) |
commit | ad3fee790088d36ad862e31535b5b99c25adeef4 (patch) | |
tree | 916a5c23cf57283f9f6a5abf8418364c52249ad9 /drivers/block/drbd/drbd_main.c | |
parent | 7753a4c17f9e305ed19d8851e1a3154c8c9abaaf (diff) | |
download | linux-ad3fee790088d36ad862e31535b5b99c25adeef4.tar.xz |
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_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 5886596..ad7c0e8 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -1909,6 +1909,7 @@ void drbd_init_set_defaults(struct drbd_device *device) drbd_set_defaults(device); atomic_set(&device->ap_bio_cnt, 0); + atomic_set(&device->ap_actlog_cnt, 0); atomic_set(&device->ap_pending_cnt, 0); atomic_set(&device->rs_pending_cnt, 0); atomic_set(&device->unacked_cnt, 0); |