mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
Illumos 6281 - prefetching should apply to 1MB reads
6281 prefetching should apply to 1MB reads Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Alexander Motin <mav@freebsd.org> Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Justin Gibbs <gibbs@scsiguy.com> Reviewed by: Xin Li <delphij@freebsd.org> Approved by: Gordon Ross <gordon.ross@nexenta.com> References: https://www.illumos.org/issues/6281 https://github.com/illumos/illumos-gate/commit/6328027 Ported-by: kernelOfTruth kerneloftruth@gmail.com Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
fe467e06fd
commit
a6fb32b85a
@ -442,7 +442,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & DMU_READ_NO_PREFETCH) == 0 && read &&
|
if ((flags & DMU_READ_NO_PREFETCH) == 0 && read &&
|
||||||
length < zfetch_array_rd_sz) {
|
length <= zfetch_array_rd_sz) {
|
||||||
dmu_zfetch(&dn->dn_zfetch, blkid, nblks);
|
dmu_zfetch(&dn->dn_zfetch, blkid, nblks);
|
||||||
}
|
}
|
||||||
rw_exit(&dn->dn_struct_rwlock);
|
rw_exit(&dn->dn_struct_rwlock);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
|
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/zfs_context.h>
|
#include <sys/zfs_context.h>
|
||||||
@ -50,7 +50,7 @@ unsigned int zfetch_max_streams = 8;
|
|||||||
unsigned int zfetch_min_sec_reap = 2;
|
unsigned int zfetch_min_sec_reap = 2;
|
||||||
/* max bytes to prefetch per stream (default 8MB) */
|
/* max bytes to prefetch per stream (default 8MB) */
|
||||||
unsigned int zfetch_max_distance = 8 * 1024 * 1024;
|
unsigned int zfetch_max_distance = 8 * 1024 * 1024;
|
||||||
/* number of bytes in a array_read at which we stop prefetching (1MB) */
|
/* max number of bytes in an array_read in which we allow prefetching (1MB) */
|
||||||
unsigned long zfetch_array_rd_sz = 1024 * 1024;
|
unsigned long zfetch_array_rd_sz = 1024 * 1024;
|
||||||
|
|
||||||
typedef struct zfetch_stats {
|
typedef struct zfetch_stats {
|
||||||
|
Loading…
Reference in New Issue
Block a user