Name

kvmalloc_node — attempt to allocate physically contiguous memory, but upon failure, fall back to non-contiguous (vmalloc) allocation.

Synopsis

void * kvmalloc_node (size_t size,
 gfp_t flags,
 int node);
 

Arguments

size

size of the request.

flags

gfp mask for the allocation - must be compatible (superset) with GFP_KERNEL.

node

numa node to allocate from

Description

Uses kmalloc to get the memory but if the allocation fails then falls back to the vmalloc allocator. Use kvfree for freeing the memory.

Reclaim modifiers - __GFP_NORETRY, __GFP_REPEAT and __GFP_NOFAIL are not supported

Any use of gfp flags outside of GFP_KERNEL should be consulted with mm people.