[dm-devel] [PATCH 0/7] reliable memory allocation and fix for bug 1225370

Mikulas Patocka mpatocka at redhat.com
Fri Jul 3 20:56:42 UTC 2015


Hi

Here I'm posting a set of patches that introduce a new function 
dm_kvmalloc and fix bug 1225370.

dm_kvmalloc is general memory allocator for reliable allocation of objects 
of arbitrary size. It tries to use kmalloc first (because it is faster and 
it results in less pressure on the TLB). However, kmalloc of a large 
object may fail because of memory fragmentation - in that case it reverts 
to vmalloc.

The memory allocated with dm_kvmalloc should be freed with kvfree (that 
function is already present in the kernel in mm/util.c).

Mikulas




More information about the dm-devel mailing list