summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_io.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-03-24 18:04:25 +0000
committermav <mav@FreeBSD.org>2010-03-24 18:04:25 +0000
commitb64dc964ac88c9f7dcfa09ea67af3a78ac8a12fb (patch)
tree46948ecddd4c6f142d424dd0701dda4424186d8e /sys/geom/geom_io.c
parent72d5a23b387cf54f99b9847978595f8298eee7e9 (diff)
downloadFreeBSD-src-b64dc964ac88c9f7dcfa09ea67af3a78ac8a12fb.zip
FreeBSD-src-b64dc964ac88c9f7dcfa09ea67af3a78ac8a12fb.tar.gz
Do not fetch precise time of request start when stats collection disabled.
Reviewed by: pjd, phk
Diffstat (limited to 'sys/geom/geom_io.c')
-rw-r--r--sys/geom/geom_io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c
index 0b6525e..931b7c3 100644
--- a/sys/geom/geom_io.c
+++ b/sys/geom/geom_io.c
@@ -443,7 +443,10 @@ g_io_request(struct bio *bp, struct g_consumer *cp)
("Bio already on queue bp=%p", bp));
bp->bio_flags |= BIO_ONQUEUE;
- binuptime(&bp->bio_t0);
+ if (g_collectstats)
+ binuptime(&bp->bio_t0);
+ else
+ getbinuptime(&bp->bio_t0);
/*
* The statistics collection is lockless, as such, but we
OpenPOWER on IntegriCloud