diff options
author | George Amanakis <gamanakis@gmail.com> | 2021-11-11 20:52:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 20:52:16 +0000 |
commit | c9d62d1356380669a8cd7ca1979d2d38e5e9777f (patch) | |
tree | 698ba85225bc160e2d6d31c8dd0c6ac1ee080d5c /module/zfs/arc.c | |
parent | 420b44488ff91dc0f67c24faae5d580122b08cfb (diff) | |
download | src-c9d62d1356380669a8cd7ca1979d2d38e5e9777f.tar.gz src-c9d62d1356380669a8cd7ca1979d2d38e5e9777f.zip |
Introduce a tunable to exclude special class buffers from L2ARC
Special allocation class or dedup vdevs may have roughly the same
performance as L2ARC vdevs. Introduce a new tunable to exclude those
buffers from being cacheable on L2ARC.
Reviewed-by: Don Brady <don.brady@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #11761
Closes #12285
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r-- | module/zfs/arc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c index f0330150f986..79e2d4381830 100644 --- a/module/zfs/arc.c +++ b/module/zfs/arc.c @@ -870,6 +870,14 @@ static void l2arc_hdr_arcstats_update(arc_buf_hdr_t *hdr, boolean_t incr, l2arc_hdr_arcstats_update((hdr), B_FALSE, B_TRUE) /* + * l2arc_exclude_special : A zfs module parameter that controls whether buffers + * present on special vdevs are eligibile for caching in L2ARC. If + * set to 1, exclude dbufs on special vdevs from being cached to + * L2ARC. + */ +int l2arc_exclude_special = 0; + +/* * l2arc_mfuonly : A ZFS module parameter that controls whether only MFU * metadata and data are cached from ARC into L2ARC. */ @@ -11097,6 +11105,10 @@ ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, rebuild_blocks_min_l2size, ULONG, ZMOD_RW, ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, mfuonly, INT, ZMOD_RW, "Cache only MFU data from ARC into L2ARC"); +ZFS_MODULE_PARAM(zfs_l2arc, l2arc_, exclude_special, INT, ZMOD_RW, + "If set to 1 exclude dbufs on special vdevs from being cached to " + "L2ARC."); + ZFS_MODULE_PARAM_CALL(zfs_arc, zfs_arc_, lotsfree_percent, param_set_arc_int, param_get_int, ZMOD_RW, "System free memory I/O throttle in bytes"); |