HomeFreeBSD

Fix ARC hit rate

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jan 8 2018, 5:52 PM
GitHub <noreply@github.com>Committed on Jan 8 2018, 5:52 PM
Parents
rG390d679acdfa: Fix 'zpool add' handling of nested interior VDEVs
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG0873bb633745: Fix ARC hit rate (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jan 8 2018, 5:52 PM