]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dbuf.c
Fix ARC hit rate
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 8 Jan 2018 17:52:36 +0000 (09:52 -0800)
committerGitHub <noreply@github.com>
Mon, 8 Jan 2018 17:52:36 +0000 (09:52 -0800)
commit0873bb6337452e3e028e40f5dad945b30deab185
tree13f3528a48e2b1dcdbb9804689217019e8d44cda
parent390d679acdfa6a2498280a4dcd33b7600ace27ce
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 <dinatale2@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tim Chase <tim@chase2k.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6171
Closes #6852
Closes #6989
include/sys/arc.h
module/zfs/arc.c
module/zfs/dbuf.c