aboutsummaryrefslogtreecommitdiffstats
path: root/module/splat/splat-kmem.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-10-01 18:34:41 -0400
committerBrian Behlendorf <[email protected]>2014-10-17 15:11:51 -0700
commit8bbbe46f8680389888d6111f8d81429dcc5defac (patch)
tree5c4aaeafb2ef237e884021082fac39bb373f2dcf /module/splat/splat-kmem.c
parente1310afae3bdb17628b40c35561f2daedfaf4062 (diff)
Remove global memory variables
Platforms such as Illumos and FreeBSD have historically provided global variables which summerize the memory state of a system. Linux on the otherhand doesn't expose any of this information to kernel modules and uses entirely different mechanisms for memory management. In order to simplify the original ZFS port to Linux these global variables were emulated by the SPL for the benefit of ZFS. As ZoL has matured over the years it has moved steadily away from these interfaces and now no longer depends on them at all. Therefore, this patch completely removes the global variables availrmem, minfree, desfree, lotsfree, needfree, swapfs_minfree, and swapfs_reserve. This greatly simplifies the memory management code and eliminates a common area of confusion. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/splat/splat-kmem.c')
-rw-r--r--module/splat/splat-kmem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c
index ebc6a042f..76643db18 100644
--- a/module/splat/splat-kmem.c
+++ b/module/splat/splat-kmem.c
@@ -1052,9 +1052,8 @@ splat_kmem_test10(struct file *file, void *arg)
for (alloc = 1; alloc <= 1024; alloc *= 2) {
- /* Skip tests which exceed available memory. We
- * leverage availrmem here for some extra testing */
- if (size * alloc * SPLAT_KMEM_THREADS > availrmem / 2)
+ /* Skip tests which exceed 1/2 of physical memory. */
+ if (size * alloc * SPLAT_KMEM_THREADS > physmem / 2)
continue;
rc = splat_kmem_cache_thread_test(file, arg,