diff options
author | mav <mav@FreeBSD.org> | 2014-12-18 08:46:53 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-12-18 08:46:53 +0000 |
commit | a0e66849d77b7eb8f8b9c7eb8654072770265a26 (patch) | |
tree | 5705cdc2dc3c9a3bbee29415657db6632ea342da /sys/cam/ctl/ctl_backend_block.c | |
parent | fe777840ded187e47a984e175b6996cd6a910bf7 (diff) | |
download | FreeBSD-src-a0e66849d77b7eb8f8b9c7eb8654072770265a26.zip FreeBSD-src-a0e66849d77b7eb8f8b9c7eb8654072770265a26.tar.gz |
MFC r275568:
Count consecutive read requests as blocking in CTL for files and ZVOLs.
Technically read requests can be executed in any order or simultaneously
since they are not changing any data. But ZFS prefetcher goes crasy when
it receives consecutive requests from different threads. Since prefetcher
works on level of separate blocks, instead of two consecutive 128K requests
it may receive 32 8K requests in mixed order.
This patch is more workaround then a real fix, and it does not fix all of
prefetcher problems, but it improves sequential read speed by 3-4x times
in some configurations. On the other side it may hurt performance if
some backing store has no prefetch, that is why it is disabled by default
for raw devices.
Diffstat (limited to 'sys/cam/ctl/ctl_backend_block.c')
-rw-r--r-- | sys/cam/ctl/ctl_backend_block.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 8f7c5d4..e3f52d7 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -2207,6 +2207,8 @@ ctl_be_block_create(struct ctl_be_block_softc *softc, struct ctl_lun_req *req) be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_OFFLINE; if (unmap) be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_UNMAP; + if (be_lun->dispatch != ctl_be_block_dispatch_dev) + be_lun->ctl_be_lun.flags |= CTL_LUN_FLAG_SERSEQ_READ; be_lun->ctl_be_lun.be_lun = be_lun; be_lun->ctl_be_lun.maxlba = (be_lun->size_blocks == 0) ? 0 : (be_lun->size_blocks - 1); |