]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/arc.c
Non-l2arc pool reads shouldn't be l2arc misses
authorAdam D. Moss <c@yotes.com>
Tue, 20 Oct 2020 18:39:52 +0000 (11:39 -0700)
committerGitHub <noreply@github.com>
Tue, 20 Oct 2020 18:39:52 +0000 (11:39 -0700)
commit666aa69f32ff2558ef9e9a27bc4cb5559e21d795
tree8a4b4647c3a84ef1aae50a0e4d0aacc5d77d3432
parent241c62bdd7fbc0683d54c40b4a184cf889ebd774
Non-l2arc pool reads shouldn't be l2arc misses

The current l2_misses accounting behavior treats all reads to pools
without a configured l2arc as an l2arc miss, IFF there is at least
one other pool on the system which does have an l2arc configured.

This makes it extremely hard to tune for an improved l2arc hit/miss
ratio because this ratio will be modulated by reads from pools which
do not (and should not) have l2arc devices; its upper limit will
depend on the ratio of reads from l2arc'd pools and non-l2arc'd pools.

This PR prevents ARC reads affecting l2arc stats (n.b. l2_misses is
the only relevant one) where the target spa doesn't have an l2arc.

Includes new test - l2arc_l2miss_pos.ksh

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Amanakis <gamanakis@gmail.com>
Signed-off-by: Adam Moss <c@yotes.com>
Closes #10921
module/zfs/arc.c
tests/runfiles/common.run
tests/zfs-tests/tests/functional/l2arc/Makefile.am
tests/zfs-tests/tests/functional/l2arc/l2arc.cfg
tests/zfs-tests/tests/functional/l2arc/l2arc_l2miss_pos.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/l2arc/setup.ksh