]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 309714: Fix spa_alloc_tree sorting by offset in r305331.
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 15 Dec 2016 08:11:32 +0000 (08:11 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 15 Dec 2016 08:11:32 +0000 (08:11 +0000)
commite75c0aafe1e17e3ff06d6e10fba6294b3648e282
treef406d3bf4b4cc0555d69c646d5d07b79f4c14362
parent38b9eaac6d9fc0e46f1978ebcc0a4e7060da7695
MFC 309714: 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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@310106 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c