summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSebastian Gottschall <[email protected]>2020-09-30 22:22:34 +0200
committerBrian Behlendorf <[email protected]>2020-10-01 12:22:48 -0700
commit7ce9da0bea1e0cffa29f35143a6a179937e22a38 (patch)
treedff16366d8fa0dbfa0099e7001f94551d91f7642 /include
parente58dee8cae11beb82fce2bb2cb039584b82b4040 (diff)
do a cyclic seek for unused memory objects in pool
In non regular use cases allocated memory might stay persistent in memory pool. This small patch checks every minute if there are old objects which can be released from memory pool. Right now with regular use, the pool is checked for old objects on each allocation attempt from this pool. so basically polling by its use. Now consider what happens if someone writes a lot of files and stops use of the volume or even unmounts it. So the code will no longer check if objects can be released from the pool. Already allocated objects will still stay in pool cache. this is no big issue for common use. But someone discovered this issue while doing tests. personally i know this behavior and I'm aware of it. Its no big issue. just a enhancement Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Kjeld Schouten-Lebbing <[email protected]> Signed-off-by: Sebastian Gottschall <[email protected]> Closes #10938 Closes #10969
Diffstat (limited to 'include')
-rw-r--r--include/sys/zstd/zstd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/zstd/zstd.h b/include/sys/zstd/zstd.h
index f965df319..e42e44c23 100644
--- a/include/sys/zstd/zstd.h
+++ b/include/sys/zstd/zstd.h
@@ -90,6 +90,7 @@ int zfs_zstd_decompress_level(void *s_start, void *d_start, size_t s_len,
size_t d_len, uint8_t *level);
int zfs_zstd_decompress(void *s_start, void *d_start, size_t s_len,
size_t d_len, int n);
+void zfs_zstd_cache_reap_now(void);
#ifdef __cplusplus
}