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.
This commit is contained in:
mav 2015-01-25 14:29:40 +00:00
parent a833c07b8b
commit 35b0606440

View File

@ -313,6 +313,11 @@ vdev_queue_timestamp_compare(const void *x1, const void *x2)
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)