mirror_zfs/module
Jitendra Patidar 4c925936e3 ZFS traverse_visitbp optimization to limit prefetch
Traversal code, traverse_visitbp() does visit blocks recursively.
Indirect (Non L0) Block of size 128k could contain, 1024 block pointers
of 128 bytes. In case of full traverse OR incremental traverse, where
all blocks were modified, it could traverse large number of blocks
pointed by indirect. Traversal code does issue prefetch of blocks
traversed below indirect. This could result into large number of
async reads queued on vdev queue. So, account for prefetch issued for
blocks pointed by indirect and limit max prefetch in one go.

Module Param:
zfs_traverse_indirect_prefetch_limit: Limit of prefetch while traversing
an indirect block.

Local counters:
prefetched: Local counter to account for number prefetch done.
pidx: Index for which next prefetch to be issued.
ptidx: Index at which next prefetch to be triggered.

Keep "ptidx" somewhere in the middle of blocks prefetched, so that
blocks prefetch read gets the enough time window before their demand
read is issued.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Jitendra Patidar <jitendra.patidar@nutanix.com>
Closes #11802 
Closes #11803
2021-04-19 15:22:57 -07:00
..
avl Fix various typos 2021-04-07 13:27:11 -07:00
icp Fix double sha1/sha1.o line in module/icp/Makefile.in 2021-04-14 13:19:49 -07:00
lua cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
nvpair Links in Source Files 2020-09-02 09:42:12 -07:00
os Add SIGSTOP and SIGTSTP handling to issig 2021-04-19 15:12:33 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode Fix various typos 2021-04-07 13:27:11 -07:00
zcommon Fix various typos 2021-04-07 13:27:11 -07:00
zfs ZFS traverse_visitbp optimization to limit prefetch 2021-04-19 15:22:57 -07:00
zstd Fix various typos 2021-04-07 13:27:11 -07:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd Restore FreeBSD resource usage accounting 2021-02-19 22:34:33 -08:00
Makefile.in FreeBSD module --enable-debug --enable-invariants 2021-03-05 12:16:41 -08:00