]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix spa_alloc_tree sorting by offset in r305331.
authorAlexander Motin <mav@FreeBSD.org>
Thu, 8 Dec 2016 15:58:03 +0000 (15:58 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Thu, 8 Dec 2016 15:58:03 +0000 (15:58 +0000)
commit9373759d13155c120024ebeba496e69d50d88e72
tree04505a3013028f2809444c386c82576a152cf32b
parent29edde94ac39ca3c987fc841ef1f484c1c0f92cf
Fix spa_alloc_tree sorting by offset in r305331.

Original commit "7090 zfs should improve allocation order" declares alloc
queue sorted by time and offset.  But in practice io_offset is always zero,
so sorting happened only by time, while order of writes with equal time was
completely random.  On Illumos this did not affected much thanks to using
high resolution timestamps.  On FreeBSD due to using much faster but low
resolution timestamps it caused bad data placement on disks, affecting
further read performance.

This change switches zio_timestamp_compare() from comparing uninitialized
io_offset to really populated io_bookmark values.  I haven't decided yet
what to do with timestampts, but on simple tests this change gives the
same peformance results by just making code to work as declared.

MFC after: 1 week
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c