diff options
author | Brian Behlendorf <[email protected]> | 2009-02-05 12:26:34 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-02-05 12:26:34 -0800 |
commit | 4ab13d3b5c2d0724632dd29c0970ff7df00985f5 (patch) | |
tree | c006243f54c1f75d07a231fef0fbe5ddab2c4ef3 /include/sys/vmsystm.h | |
parent | 36b313dacf2f60f526fe98b7e9d1a6bbcbb250d2 (diff) |
Additional Linux VM integration
Added support for Solaris swapfs_minfree, and swapfs_reserve tunables.
In additional availrmem is now available and return a reasonable value
which is reasonably analogous to the Solaris meaning. On linux we
return the sun of free and inactive pages since these are all easily
reclaimable.
All tunables are available in /proc/sys/kernel/spl/vm/* and they may
need a little adjusting once we observe the real behavior. Some of
the defaults are mapped to similar linux counterparts, others are
straight from the OpenSolaris defaults.
Diffstat (limited to 'include/sys/vmsystm.h')
-rw-r--r-- | include/sys/vmsystm.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h index a6e9e7d7e..75ae8a991 100644 --- a/include/sys/vmsystm.h +++ b/include/sys/vmsystm.h @@ -45,15 +45,14 @@ #define physmem num_physpages #define freemem nr_free_pages() +#define availrmem spl_kmem_availrmem() extern pgcnt_t minfree; /* Sum of zone->pages_min */ extern pgcnt_t desfree; /* Sum of zone->pages_low */ extern pgcnt_t lotsfree; /* Sum of zone->pages_high */ -extern pgcnt_t needfree; /* Always 0 */ -extern pgcnt_t swapfs_minfree; -extern pgcnt_t swapfs_desfree; -extern pgcnt_t swapfs_reserve; -extern pgcnt_t availrmem; +extern pgcnt_t needfree; /* Always 0 unused in new Solaris */ +extern pgcnt_t swapfs_minfree; /* Solaris default value */ +extern pgcnt_t swapfs_reserve; /* Solaris default value */ extern vmem_t *heap_arena; /* primary kernel heap arena */ extern vmem_t *zio_alloc_arena; /* arena for zio caches */ @@ -62,15 +61,8 @@ extern vmem_t *zio_arena; /* arena for allocating zio memory */ #define VMEM_ALLOC 0x01 #define VMEM_FREE 0x02 -static __inline__ size_t -vmem_size(vmem_t *vmp, int typemask) -{ - /* Arena's unsupported */ - ASSERT(vmp == NULL); - ASSERT(typemask & (VMEM_ALLOC | VMEM_FREE)); - - return 0; -} +extern pgcnt_t spl_kmem_availrmem(void); +extern size_t vmem_size(vmem_t *vmp, int typemask); #define xcopyin(from, to, size) copy_from_user(to, from, size) #define xcopyout(from, to, size) copy_to_user(to, from, size) |