]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Move gethrtime() calls out of vdev queue lock
authorAlexander Motin <mav@FreeBSD.org>
Tue, 6 Jul 2021 21:38:00 +0000 (17:38 -0400)
committerTony Hutter <hutter2@llnl.gov>
Tue, 14 Sep 2021 19:35:53 +0000 (12:35 -0700)
commit41b33dce4438b5d810597b72fbc21ad1feb85441
tree5e61c8d4ed1c67d93efdbb32a0dbaca3532a637e
parentdab147d65ac03cc50f1d397e8ff79b695e657660
Move gethrtime() calls out of vdev queue lock

This dramatically reduces the lock contention on systems with slower
(non-TSC) timecounters.  With TSC the difference is minimal, but since
this lock is pretty congested, any improvement counts.  Plus I don't
see any reason to do it under the lock other than the latency of the
lock itself, which this change actually reduces.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Closes #12281
module/zfs/vdev_queue.c