diff options
author | smh <smh@FreeBSD.org> | 2014-10-10 00:12:16 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2014-10-10 00:12:16 +0000 |
commit | 227e0641478d6ec14ae84c216f886f45300c123d (patch) | |
tree | 2c92681f0b14057f8f38ca69aeab6e9cb9e88935 /sys/cddl/compat/opensolaris | |
parent | e926a5c769cb5f122840c693a82ff7e44820590e (diff) | |
download | FreeBSD-src-227e0641478d6ec14ae84c216f886f45300c123d.zip FreeBSD-src-227e0641478d6ec14ae84c216f886f45300c123d.tar.gz |
MFC r270759:
Refactor ZFS ARC reclaim logic to be more VM cooperative
MFC r270861:
Ensure that ZFS ARC free memory checks include cached pages
MFC r272483:
Refactor ZFS ARC reclaim checks and limits
Sponsored by: Multiplay
Diffstat (limited to 'sys/cddl/compat/opensolaris')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c | 7 | ||||
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/kmem.h | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c b/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c index 543a3a6..eb2bfdc 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c @@ -133,13 +133,6 @@ kmem_size(void) return (kmem_size_val); } -uint64_t -kmem_used(void) -{ - - return (vmem_size(kmem_arena, VMEM_ALLOC)); -} - static int kmem_std_constructor(void *mem, int size __unused, void *private, int flags) { diff --git a/sys/cddl/compat/opensolaris/sys/kmem.h b/sys/cddl/compat/opensolaris/sys/kmem.h index ee6b33f..e3958e9 100644 --- a/sys/cddl/compat/opensolaris/sys/kmem.h +++ b/sys/cddl/compat/opensolaris/sys/kmem.h @@ -66,7 +66,6 @@ typedef struct kmem_cache { void *zfs_kmem_alloc(size_t size, int kmflags); void zfs_kmem_free(void *buf, size_t size); uint64_t kmem_size(void); -uint64_t kmem_used(void); kmem_cache_t *kmem_cache_create(char *name, size_t bufsize, size_t align, int (*constructor)(void *, void *, int), void (*destructor)(void *, void *), void (*reclaim)(void *) __unused, void *private, vmem_t *vmp, int cflags); @@ -78,6 +77,9 @@ void kmem_reap(void); int kmem_debugging(void); void *calloc(size_t n, size_t s); +#define freemem (cnt.v_free_count + cnt.v_cache_count) +#define minfree cnt.v_free_min +#define heap_arena kmem_arena #define kmem_alloc(size, kmflags) zfs_kmem_alloc((size), (kmflags)) #define kmem_zalloc(size, kmflags) zfs_kmem_alloc((size), (kmflags) | M_ZERO) #define kmem_free(buf, size) zfs_kmem_free((buf), (size)) |