K 10 svn:author V 3 avg K 8 svn:date V 27 2015-09-10T16:13:44.258344Z K 7 svn:log V 1121 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 Reviewed by: George Wilson Reviewed by: Paul Dagnelie Approved by: Gordon Ross Author: Matthew Ahrens END