]> git.proxmox.com Git - mirror_zfs.git/commit
Make use of kvmalloc if available and fix vmem_alloc implementation
authorMichael Niewöhner <foss@mniewoehner.de>
Sun, 21 Jul 2019 17:34:07 +0000 (19:34 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 13 Nov 2019 18:05:10 +0000 (10:05 -0800)
commit66955885e24427a94e938c013da214bd5c0177d4
tree3f00fd60867f7a8de3848fe6d4074822de44717f
parentc025008df5398be4eb7f5b98e75822f447833dd4
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 <behlendorf1@llnl.gov>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #9034
config/kernel-kmem.m4
config/kernel.m4
include/os/linux/spl/sys/kmem.h
module/os/linux/spl/spl-kmem-cache.c
module/os/linux/spl/spl-kmem.c