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
This commit is contained in:
parent
c8e00ff96e
commit
2de874ed23
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276952
@ -301,6 +301,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)
|
||||
|
Loading…
Reference in New Issue
Block a user