Remove get_vmalloc_info() wrapper

The get_vmalloc_info() function was used to back the vmem_size()
function.  This was always problematic and resulted in brittle
code because the kernel never provided a clean interface for
modules.

However, it turns out that the only caller of this function in
ZFS uses it to determine the total virtual address space size.
This can be determined easily without get_vmalloc_info() so
vmem_size() has been updated to take this approach which allows
us to shed the get_vmalloc_info() dependency.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2014-10-01 18:05:39 -04:00
parent 50e41ab1e1
commit e1310afae3
4 changed files with 8 additions and 182 deletions
-39
View File
@@ -25,12 +25,10 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_ATOMIC_SPINLOCK
SPL_AC_SHRINKER_CALLBACK
SPL_AC_CTL_NAME
SPL_AC_VMALLOC_INFO
SPL_AC_PDE_DATA
SPL_AC_MUTEX_OWNER
SPL_AC_MUTEX_OWNER_TASK_STRUCT
SPL_AC_KALLSYMS_LOOKUP_NAME
SPL_AC_GET_VMALLOC_INFO
SPL_AC_PGDAT_HELPERS
SPL_AC_FIRST_ONLINE_PGDAT
SPL_AC_NEXT_ONLINE_PGDAT
@@ -990,43 +988,6 @@ AC_DEFUN([SPL_AC_KALLSYMS_LOOKUP_NAME],
])
])
dnl #
dnl # Proposed API change,
dnl # This symbol is not available in stock kernels. You may build a
dnl # custom kernel with the *-spl-export-symbols.patch which will export
dnl # these symbols for use. If your already rolling a custom kernel for
dnl # your environment this is recommended.
dnl #
AC_DEFUN([SPL_AC_GET_VMALLOC_INFO],
[AC_MSG_CHECKING([whether get_vmalloc_info() is available])
SPL_CHECK_SYMBOL_EXPORT([get_vmalloc_info], [], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GET_VMALLOC_INFO, 1,
[get_vmalloc_info() is available])
], [
AC_MSG_RESULT(no)
])
])
dnl #
dnl # 3.10 API change,
dnl # struct vmalloc_info is now declared in linux/vmalloc.h
dnl #
AC_DEFUN([SPL_AC_VMALLOC_INFO], [
AC_MSG_CHECKING([whether struct vmalloc_info is declared])
SPL_LINUX_TRY_COMPILE([
#include <linux/vmalloc.h>
struct vmalloc_info { void *a; };
],[
return 0;
],[
AC_MSG_RESULT(no)
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_VMALLOC_INFO, 1, [yes])
])
])
dnl #
dnl # 3.10 API change,
dnl # PDE is replaced by PDE_DATA