diff --git a/mm/vmalloc.c b/mm/vmalloc.c index a7b522f4851d3869e1ff502cde866e07494532df..bf233b283319cea03fcf76f2d81dce5b9933d536 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1085,6 +1085,12 @@ EXPORT_SYMBOL(vm_unmap_ram); * @node: prefer to allocate data structures on this node * @prot: memory protection to use. PAGE_KERNEL for regular RAM * + * If you use this function for less than VMAP_MAX_ALLOC pages, it could be + * faster than vmap so it's good. But if you mix long-life and short-life + * objects with vm_map_ram(), it could consume lots of address space through + * fragmentation (especially on a 32bit machine). You could see failures in + * the end. Please use this function for short-lived objects. + * * Returns: a pointer to the address that has been mapped, or %NULL on failure */ void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot)