Should vmalloc and kmalloc be integrated?

Eric W. Biederman (ebiederm+eric@npwt.net)
06 Nov 1997 17:29:02 -0600


Except for DMA buffer allocations (where contiguous memory is needed)
vmalloc and kmalloc are equivally correct to use. There is allready a
DMA priority in the linux kernel for kmalloc so it can detect that
situation.

Considering that several systems have trouble allocating large chunks
of continous memory, for the slab allocator? I think using vmalloc as
a fallback for kmalloc either indirectly in kmalloc or indirectly in
the code itself is a good idea that shouldn't be too difficult.

Considering the number of places in the kernel and the possibility for
optimizing, vmalloc I think should become a special case of kmalloc.
It is easy for to detect which is wich as the allocated addresses are
in different areas of the address space.

I should probably ask this directly of whoever maintains kmalloc but
I'm lazy and I'm just bouncing this off the list.

Eric