aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorAlexander Motin <[email protected]>2024-07-30 14:40:47 -0400
committerGitHub <[email protected]>2024-07-30 11:40:47 -0700
commitd4b5517ef95948d22a26376768442a59116fa4e7 (patch)
treeaad84853287a0dc377d14c0f7e522a9198a7db96 /include/sys
parentd54d0fff392a8889e794a10c1e90746f4493cf30 (diff)
Linux: Report reclaimable memory to kernel as such (#16385)
Linux provides SLAB_RECLAIM_ACCOUNT and __GFP_RECLAIMABLE flags to mark memory allocations that can be freed via shinker calls. It should allow kernel to tune and group such allocations for lower memory fragmentation and better reclamation under pressure. This patch marks as reclaimable most of ARC memory, directly evictable via ZFS shrinker, plus also dnode/znode/sa memory, indirectly evictable via kernel's superblock shrinker. Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Allan Jude <[email protected]>
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/zfs_context.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index e4711ce41..998eaa5dd 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -413,6 +413,7 @@ void procfs_list_add(procfs_list_t *procfs_list, void *p);
#define KM_NORMALPRI 0 /* not needed with UMEM_DEFAULT */
#define KMC_NODEBUG UMC_NODEBUG
#define KMC_KVMEM 0x0
+#define KMC_RECLAIMABLE 0x0
#define kmem_alloc(_s, _f) umem_alloc(_s, _f)
#define kmem_zalloc(_s, _f) umem_zalloc(_s, _f)
#define kmem_free(_b, _s) umem_free(_b, _s)