|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH][2/17] USB virt 2.6 split driver---xenidc buffer
On 22 Nov 2005, at 10:55, Muli Ben-Yehuda wrote:
I don't understand this. I thought vmalloc was more likely to be
successful than kmalloc because the memory doesn't need to be
contiguous
so I thought it was preferable to use vmalloc when possible.
Nope, vmalloc has both a resource usage issue (we only have a limited
vmalloc space) and some small overhead that kmalloc doesn't. The only
time you should use vmalloc is if you know that kmalloc can't give you
a large enough buffer.
If the buffer is > PAGE_SIZE, you should use vmalloc if at all
possible. Order != 0 allocations can easily fail on a churned box with
lots of memory fragmentation.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|