RE: take7: vector sharing (Large I/O system support)

From: Luck, Tony <tony.luck_at_intel.com>
Date: 2005-03-03 04:42:36
> Can I use alloc_bootmem as well as kmalloc to allocate arbitrary
> size of memory?

The decision on which to use is based on when in the boot sequence
you need to do the allocation.  Before "free_all_bootmem()" [or on
NUMA systems "free_all_bootmem_node()"] you must use alloc_bootmem(),
afterwards you must use kmalloc() [or vmalloc(), or alloc_pages()].

If the features of the allocation you need to make demand the semantics
of a particular allocator, then you will have to fix your code to
make the allocation during a period of the boot sequence when the
allocator you want to use is valid.

alloc_bootmem() is not so good at small allocations (especially of
objects that you plan to free again) ... for very large allocations
it may be the only choice (as it gets called before fragmentation
sets in).

-Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Mar 2 12:44:40 2005

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:36 EST