diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2013-11-22 12:32:01 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-07-10 18:35:11 +0200 |
commit | e5f891b2234dbab8c8797111a61519d0728ef855 (patch) | |
tree | 743808e1d2252876c0b0f3550c6dba70f7e8e779 /drivers/block/drbd/drbd_worker.c | |
parent | e37d2438d8e5e4c1225cf94d45347fa207835447 (diff) |
drbd: gather detailed timing statistics for drbd_requests
Record (in jiffies) how much time a request spends in which stages.
Followup commits will use and present this additional timing information
so we can better locate and tackle the root causes of latency spikes,
or present the backlog for asynchronous replication.
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_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 3978d9ec6f0..0ff8f463774 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -1368,6 +1368,7 @@ int w_send_out_of_sync(struct drbd_work *w, int cancel) req_mod(req, SEND_CANCELED); return 0; } + req->pre_send_jif = jiffies; /* this time, no connection->send.current_epoch_writes++; * If it was sent, it was the closing barrier for the last @@ -1398,6 +1399,7 @@ int w_send_dblock(struct drbd_work *w, int cancel) req_mod(req, SEND_CANCELED); return 0; } + req->pre_send_jif = jiffies; re_init_if_first_write(connection, req->epoch); maybe_send_barrier(connection, req->epoch); @@ -1426,6 +1428,7 @@ int w_send_read_req(struct drbd_work *w, int cancel) req_mod(req, SEND_CANCELED); return 0; } + req->pre_send_jif = jiffies; /* Even read requests may close a write epoch, * if there was any yet. */ |