mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Adjust ARC prefetch tunables to match docs
Currently, the ARC exposes 2 tunables (zfs_arc_min_prefetch_ms and zfs_arc_min_prescient_prefetch_ms) which are documented to be specified in milliseconds. However, the code actually uses the values as though they were in seconds. This patch adjusts the code to match the names and documentation of the tunables. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed by: George Melikov <mail@gmelikov.ru> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #7126
This commit is contained in:
committed by
Brian Behlendorf
parent
60b8207496
commit
2b84817f66
+4
-4
@@ -3845,7 +3845,8 @@ arc_evict_hdr(arc_buf_hdr_t *hdr, kmutex_t *hash_lock)
|
||||
/* prefetch buffers have a minimum lifespan */
|
||||
if (HDR_IO_IN_PROGRESS(hdr) ||
|
||||
((hdr->b_flags & (ARC_FLAG_PREFETCH | ARC_FLAG_INDIRECT)) &&
|
||||
ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access < min_lifetime * hz)) {
|
||||
ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access <
|
||||
MSEC_TO_TICK(min_lifetime))) {
|
||||
ARCSTAT_BUMP(arcstat_evict_skip);
|
||||
return (bytes_evicted);
|
||||
}
|
||||
@@ -7470,9 +7471,8 @@ arc_init(void)
|
||||
cv_init(&arc_reclaim_thread_cv, NULL, CV_DEFAULT, NULL);
|
||||
cv_init(&arc_reclaim_waiters_cv, NULL, CV_DEFAULT, NULL);
|
||||
|
||||
/* Convert seconds to clock ticks */
|
||||
arc_min_prefetch_ms = 1;
|
||||
arc_min_prescient_prefetch_ms = 6;
|
||||
arc_min_prefetch_ms = 1000;
|
||||
arc_min_prescient_prefetch_ms = 6000;
|
||||
|
||||
#ifdef _KERNEL
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user