WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: *** SPAM *** Re: [Xen-devel] [PATCH][2/17] USB virt 2.6 split driver

On Tue, 2005-11-22 at 12:06 +0000, Keir Fraser wrote:
> On 22 Nov 2005, at 11:22, Muli Ben-Yehuda wrote:
> 
> > Quoth Linus[1[:
> >
> > "vmalloc() is NOT SOMETHING YOU SHOULD EVER USE! It's only valid for
> > when you _need_ a big array, and you don't have any choice. It's slow,
> > and it's a very restricted resource: it's a global resource that is
> > literally restricted to a few tens of megabytes. It should be _very_
> > carefully used."
> 
> He also says the correct fix is to not need a multi-page chunk in the 
> first place. If you do, then you should pre-allocate. If that's 
> impossible (e.g., you're a module) then you use vmalloc(). The page 
> allocator does not attempt any compaction, so even if there is plenty 
> of memory you may well not find a big contiguous extent.

I have a couple of small vmallocs which will be OK as kmallocs and the others 
I'm just vmalloc-ing a chunk and then splitting it up into a number of smaller 
resources anyway so I could kmalloc them individually instead.

>   -- Keir
> 
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel