Skip to content

Commit

Permalink
config: remove HAVE_KVMALLOC
Browse files Browse the repository at this point in the history
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16479
  • Loading branch information
robn authored and tonyhutter committed Nov 15, 2024
1 parent 706fbd4 commit 335c00f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
27 changes: 1 addition & 26 deletions config/kernel-kmem.m4
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,6 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [
AC_MSG_RESULT([$enable_debug_kmem_tracking])
])

dnl #
dnl # 4.12 API,
dnl # Added kvmalloc allocation strategy
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_KVMALLOC], [
ZFS_LINUX_TEST_SRC([kvmalloc], [
#include <linux/mm.h>
#include <linux/slab.h>
],[
void *p __attribute__ ((unused));
p = kvmalloc(0, GFP_KERNEL);
])
])

AC_DEFUN([ZFS_AC_KERNEL_KVMALLOC], [
AC_MSG_CHECKING([whether kvmalloc(ptr, flags) is available])
ZFS_LINUX_TEST_RESULT([kvmalloc], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_KVMALLOC, 1, [kvmalloc exists])
],[
AC_MSG_RESULT(no)
])
])

dnl #
dnl # 5.8 API,
dnl # __vmalloc PAGE_KERNEL removal
Expand All @@ -106,4 +81,4 @@ AC_DEFUN([ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL], [
AC_MSG_RESULT(no)
])
])
-
-
2 changes: 0 additions & 2 deletions config/kernel.m4
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
ZFS_AC_KERNEL_SRC_GENERIC_FADVISE
ZFS_AC_KERNEL_SRC_SCHED
ZFS_AC_KERNEL_SRC_USLEEP_RANGE
ZFS_AC_KERNEL_SRC_KVMALLOC
ZFS_AC_KERNEL_SRC_VMALLOC_PAGE_KERNEL
ZFS_AC_KERNEL_SRC_WAIT
ZFS_AC_KERNEL_SRC_INODE_TIMES
Expand Down Expand Up @@ -161,7 +160,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
ZFS_AC_KERNEL_GENERIC_FADVISE
ZFS_AC_KERNEL_SCHED
ZFS_AC_KERNEL_USLEEP_RANGE
ZFS_AC_KERNEL_KVMALLOC
ZFS_AC_KERNEL_VMALLOC_PAGE_KERNEL
ZFS_AC_KERNEL_WAIT
ZFS_AC_KERNEL_INODE_TIMES
Expand Down
2 changes: 0 additions & 2 deletions module/os/linux/spl/spl-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ EXPORT_SYMBOL(kmem_strfree);
void *
spl_kvmalloc(size_t size, gfp_t lflags)
{
#ifdef HAVE_KVMALLOC
/*
* GFP_KERNEL allocations can safely use kvmalloc which may
* improve performance by avoiding a) high latency caused by
Expand All @@ -146,7 +145,6 @@ spl_kvmalloc(size_t size, gfp_t lflags)
*/
if ((lflags & GFP_KERNEL) == GFP_KERNEL)
return (kvmalloc(size, lflags));
#endif

gfp_t kmalloc_lflags = lflags;

Expand Down

0 comments on commit 335c00f

Please sign in to comment.