Author: mav
Date: Sun Jan 11 00:26:18 2015
New Revision: 276952
URL: https://svnweb.freebsd.org/changeset/base/276952
Log:
Add LBA as secondary sort key for synchronous I/O requests.
On FreeBSD gethrtime() implemented via getnanouptime(), that has 1ms (1/hz)
precision. It makes primary sort key (timestamp) collision very possible.
In such situations sorting by secondary key of LBA is much more reasonable
then by totally meaningless zio pointer value.
With this change on multi-threaded synchronous ZVOL read I've measured 10%
throughput increase and average latency reduction.
MFC after: 2 weeks
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sat Jan
10 23:43:39 2015 (r276951)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Jan
11 00:26:18 2015 (r276952)
@@ -301,6 +301,11 @@ vdev_queue_timestamp_compare(const void
if (z1->io_timestamp > z2->io_timestamp)
return (1);
+ if (z1->io_offset < z2->io_offset)
+ return (-1);
+ if (z1->io_offset > z2->io_offset)
+ return (1);
+
if (z1 < z2)
return (-1);
if (z1 > z2)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"