summaryrefslogtreecommitdiffstats
path: root/include/sys/vmsystm.h
diff options
context:
space:
mode:
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-05-15 23:39:19 +0000
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-05-15 23:39:19 +0000
commit6ab69573ffc79db6fcd0539218e96ded41fcafc1 (patch)
treea0f63b3afb4bdbe65e4bdd5a8d4eb91280c60ff9 /include/sys/vmsystm.h
parent56f924533023e39edfda09cf1a9c47b4abfe57c7 (diff)
SPL additions to increase support for updated ZFS build
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@110 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
Diffstat (limited to 'include/sys/vmsystm.h')
-rw-r--r--include/sys/vmsystm.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/sys/vmsystm.h b/include/sys/vmsystm.h
index fb9ff9710..09f88d750 100644
--- a/include/sys/vmsystm.h
+++ b/include/sys/vmsystm.h
@@ -2,12 +2,16 @@
#define _SPL_VMSYSTM_H
#include <linux/mm.h>
+#include <linux/swap.h>
#include <sys/types.h>
#include <asm/uaccess.h>
extern vmem_t *zio_alloc_arena; /* arena for zio caches */
#define physmem num_physpages
+#define freemem nr_free_pages() /* Expensive on linux,
+ cheap on solaris */
+#define minfree 0
#define ptob(pages) (pages * PAGE_SIZE)
#define membar_producer() smp_wmb()
@@ -56,9 +60,6 @@ copyinstr(const void *from, void *to, size_t len, size_t *done)
}
#if 0
-/* The approximate total number of free pages */
-#define freemem 0
-
/* The average number of free pages over the last 5 seconds */
#define avefree 0
@@ -81,10 +82,6 @@ copyinstr(const void *from, void *to, size_t len, size_t *done)
/* When free memory is above this limit, swapping is not performed */
#define desfree 0
-
-/* Threshold for many low memory tests, e.g. swapping is
- * more active below this limit */
-#define minfree 0
#endif
#endif /* SPL_VMSYSTM_H */