mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
ddt: add support for prefetching tables into the ARC
This change adds a new `zpool prefetch -t ddt $pool` command which causes a pool's DDT to be loaded into the ARC. The primary goal is to remove the need to "warm" a pool's cache before deduplication stops slowing write performance. It may also provide a way to reload portions of a DDT if they have been flushed due to inactivity. Sponsored-by: iXsystems, Inc. Sponsored-by: Catalogics, Inc. Sponsored-by: Klara, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Will Andrews <will.andrews@klarasystems.com> Signed-off-by: Fred Weigel <fred.weigel@klarasystems.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Signed-off-by: Don Brady <don.brady@klarasystems.com> Co-authored-by: Will Andrews <will.andrews@klarasystems.com> Co-authored-by: Don Brady <don.brady@klarasystems.com> Closes #15890
This commit is contained in:
@@ -250,6 +250,16 @@ typedef struct arc_buf_info {
|
||||
enum zio_compress abi_l2arc_compress;
|
||||
} arc_buf_info_t;
|
||||
|
||||
/*
|
||||
* Flags returned by arc_cached; describes which part of the arc
|
||||
* the block is cached in.
|
||||
*/
|
||||
#define ARC_CACHED_EMBEDDED (1U << 0)
|
||||
#define ARC_CACHED_IN_L1 (1U << 1)
|
||||
#define ARC_CACHED_IN_MRU (1U << 2)
|
||||
#define ARC_CACHED_IN_MFU (1U << 3)
|
||||
#define ARC_CACHED_IN_L2 (1U << 4)
|
||||
|
||||
void arc_space_consume(uint64_t space, arc_space_type_t type);
|
||||
void arc_space_return(uint64_t space, arc_space_type_t type);
|
||||
boolean_t arc_is_metadata(arc_buf_t *buf);
|
||||
@@ -310,6 +320,7 @@ zio_t *arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
|
||||
arc_prune_t *arc_add_prune_callback(arc_prune_func_t *func, void *priv);
|
||||
void arc_remove_prune_callback(arc_prune_t *p);
|
||||
void arc_freed(spa_t *spa, const blkptr_t *bp);
|
||||
int arc_cached(spa_t *spa, const blkptr_t *bp);
|
||||
|
||||
void arc_flush(spa_t *spa, boolean_t retry);
|
||||
void arc_tempreserve_clear(uint64_t reserve);
|
||||
|
||||
Reference in New Issue
Block a user