Date: Sun, 25 Jan 2015 14:29:40 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277700 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201501251429.t0PETec0097778@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sun Jan 25 14:29:40 2015 New Revision: 277700 URL: https://svnweb.freebsd.org/changeset/base/277700 Log: MFC r276952: 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. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Jan 25 14:25:44 2015 (r277699) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Jan 25 14:29:40 2015 (r277700) @@ -313,6 +313,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501251429.t0PETec0097778>