summaryrefslogtreecommitdiffstats
path: root/config/kernel.m4
diff options
context:
space:
mode:
authorMichael Niewöhner <[email protected]>2019-07-21 19:34:07 +0200
committerBrian Behlendorf <[email protected]>2019-11-13 10:05:10 -0800
commit66955885e24427a94e938c013da214bd5c0177d4 (patch)
tree3f00fd60867f7a8de3848fe6d4074822de44717f /config/kernel.m4
parentc025008df5398be4eb7f5b98e75822f447833dd4 (diff)
Make use of kvmalloc if available and fix vmem_alloc implementation
This patch implements use of kvmalloc for GFP_KERNEL allocations, which may increase performance if the allocator is able to allocate physical memory, if kvmalloc is available as a public kernel interface (since v4.12). Otherwise it will simply fall back to virtual memory (vmalloc). Also fix vmem_alloc implementation which can lead to slow allocations since the first attempt with kmalloc does not make use of the noretry flag but tells the linux kernel to retry several times before it fails. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matt Ahrens <[email protected]> Signed-off-by: Sebastian Gottschall <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]> Closes #9034
Diffstat (limited to 'config/kernel.m4')
-rw-r--r--config/kernel.m42
1 files changed, 2 insertions, 0 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4
index 1e39c15ca..4309d5456 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -44,6 +44,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
ZFS_AC_KERNEL_SRC_SCHED
ZFS_AC_KERNEL_SRC_USLEEP_RANGE
ZFS_AC_KERNEL_SRC_KMEM_CACHE
+ ZFS_AC_KERNEL_SRC_KVMALLOC
ZFS_AC_KERNEL_SRC_WAIT
ZFS_AC_KERNEL_SRC_INODE_TIMES
ZFS_AC_KERNEL_SRC_INODE_LOCK
@@ -137,6 +138,7 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
ZFS_AC_KERNEL_SCHED
ZFS_AC_KERNEL_USLEEP_RANGE
ZFS_AC_KERNEL_KMEM_CACHE
+ ZFS_AC_KERNEL_KVMALLOC
ZFS_AC_KERNEL_WAIT
ZFS_AC_KERNEL_INODE_TIMES
ZFS_AC_KERNEL_INODE_LOCK