diff options
author | Brian Behlendorf <[email protected]> | 2018-01-08 09:52:36 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2018-01-08 09:52:36 -0800 |
commit | 0873bb6337452e3e028e40f5dad945b30deab185 (patch) | |
tree | 13f3528a48e2b1dcdbb9804689217019e8d44cda /include | |
parent | 390d679acdfa6a2498280a4dcd33b7600ace27ce (diff) |
Fix ARC hit rate
When the compressed ARC feature was added in commit d3c2ae1
the method of reference counting in the ARC was modified. As
part of this accounting change the arc_buf_add_ref() function
was removed entirely.
This would have be fine but the arc_buf_add_ref() function
served a second undocumented purpose of updating the ARC access
information when taking a hold on a dbuf. Without this logic
in place a cached dbuf would not migrate its associated
arc_buf_hdr_t to the MFU list. This would negatively impact
the ARC hit rate, particularly on systems with a small ARC.
This change reinstates the missing call to arc_access() from
dbuf_hold() by implementing a new arc_buf_access() function.
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Tim Chase <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #6171
Closes #6852
Closes #6989
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/arc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/arc.h b/include/sys/arc.h index 0e7a85188..de280362d 100644 --- a/include/sys/arc.h +++ b/include/sys/arc.h @@ -263,6 +263,7 @@ void arc_buf_destroy(arc_buf_t *buf, void *tag); void arc_buf_info(arc_buf_t *buf, arc_buf_info_t *abi, int state_index); uint64_t arc_buf_size(arc_buf_t *buf); uint64_t arc_buf_lsize(arc_buf_t *buf); +void arc_buf_access(arc_buf_t *buf); void arc_release(arc_buf_t *buf, void *tag); int arc_released(arc_buf_t *buf); void arc_buf_sigsegv(int sig, siginfo_t *si, void *unused); |