]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
5987 zfs prefetch code needs work
authoravg <avg@FreeBSD.org>
Thu, 10 Sep 2015 16:13:44 +0000 (16:13 +0000)
committeravg <avg@FreeBSD.org>
Thu, 10 Sep 2015 16:13:44 +0000 (16:13 +0000)
commitf1beee0567a1ab71ed70a722a512ec161abe4327
tree328ab4c11b919eb827ccf54d2c26264a06f103a5
parent41955a270ad902f30461c57a2c76953e60c33f8e
5987 zfs prefetch code needs work

illumos/illumos-gate@cf6106c8a0d6598b045811f9650d66e07eb332af

https://www.illumos.org/issues/5987
  The existing ZFS prefetch code (dmu_zfetch.c) has some problems:
  1. It's nearly impossible to understand. e.g. there are an abundance of kstats
  but it's hard to know what they mean (see below).
  2. For some workloads, it detects patterns that aren't really there (e.g.
  strided patterns, backwards scans), and generates needless i/os prefetching
  blocks that will never be referenced.
  3. It has lock contention issues. These are caused primarily by
  dmu_zfetch_colinear() calling dmu_zfetch_dofetch() (which can block waiting for
  i/o) with the zf_rwlock held for writer, thus blocking all other threads
  accessing this file.
  I suggest that we rewrite this code to detect only forward, sequential streams.
  [... truncated ...]

Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: Matthew Ahrens <mahrens@delphix.com>
uts/common/fs/zfs/arc.c
uts/common/fs/zfs/dbuf.c
uts/common/fs/zfs/dmu.c
uts/common/fs/zfs/dmu_zfetch.c
uts/common/fs/zfs/dnode.c
uts/common/fs/zfs/sys/arc.h
uts/common/fs/zfs/sys/dmu.h
uts/common/fs/zfs/sys/dmu_zfetch.h