]> granicus.if.org Git - zfs/commit
OpenZFS 8835 - Speculative prefetch in ZFS not working for misaligned reads
authorAlexander Motin <mav@FreeBSD.org>
Mon, 20 Nov 2017 17:56:01 +0000 (19:56 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Jan 2018 17:31:29 +0000 (09:31 -0800)
commit916384729e5d828e578c8f5c3003742360fb89ea
tree54418a2c742783f141f7a52688956e73f7c535c0
parent31864e3d8c9fc762d4c30324d9a061f4ed009446
OpenZFS 8835 - Speculative prefetch in ZFS not working for misaligned reads

In case of misaligned I/O sequential requests are not detected as such
due to overlaps in logical block sequence:

    dmu_zfetch(fffff80198dd0ae0, 27347, 9, 1)
    dmu_zfetch(fffff80198dd0ae0, 27355, 9, 1)
    dmu_zfetch(fffff80198dd0ae0, 27363, 9, 1)
    dmu_zfetch(fffff80198dd0ae0, 27371, 9, 1)
    dmu_zfetch(fffff80198dd0ae0, 27379, 9, 1)
    dmu_zfetch(fffff80198dd0ae0, 27387, 9, 1)

This patch makes single block overlap to be counted as a stream hit,
improving performance up to several times.

Authored by: Alexander Motin <mav@FreeBSD.org>
Approved by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Allan Jude <allanjude@freebsd.org>
Reviewed by: Gvozden Neskovic <neskovic@gmail.com>
Reviewed by: George Melikov <mail@gmelikov.ru>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/8835
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/aab6dd482a
Closes #7062
module/zfs/dmu_zfetch.c