HomeFreeBSD

Fix ARC stats for embedded blkptrs

Description

Fix ARC stats for embedded blkptrs

Re-factor arc_read() to better account for embedded data blkptrs.
Previously, reading the payload from an embedded blkptr would cause
arcstats such as demand_metadata_misses to be bumped when there was
actually no cache "miss" because the data are already available in
the blkptr.

The following test procedure was used to demonstrate the problem:

   zpool create tank ...
   zfs create -o compression=lz4 tank/fs
   echo blah > /tank/fs/blah
   stat /tank/fs/blah
   grep 'meta.*mis' /proc/spl/kstat/zfs/arcstats

and repeating the last two steps to watch the metadata miss counter
increment. This can also be demonstrated via the zfs_arc_miss DTRACE4
probe in arc_read().

Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: George Wilson <george.wilson@delphix.com>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #8319

Details

Provenance
Tim Chase <tim@chase2k.com>Authored on Feb 4 2019, 5:33 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 4 2019, 5:33 PM
Parents
rG96342996577a: OpenZFS 9185 - Enable testing over NFS in ZFS performance tests
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG0902c4577f4b: Fix ARC stats for embedded blkptrs (authored by Tim Chase <tim@chase2k.com>).Feb 4 2019, 5:33 PM