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

xen-devel

[Top] [All Lists]

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

To: Harry Butterworth <harry@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][2/17] USB virt 2.6 split driver---xenidc buffer resource provider
From: Muli Ben-Yehuda <mulix@xxxxxxxxx>
Date: 2005年11月22日 12:55:07 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2005年11月22日 10:55:33 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1132608600.4739.24.camel@localhost >
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1132579125.31295.113.camel@xxxxxxxxxxxxxxxxxxxxx> <20051121201811.GB22728@xxxxxxxxxxxxxxxxxxx> <1132608600.4739.24.camel@localhost >
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
On Mon, Nov 21, 2005 at 09:30:00PM +0000, Harry Butterworth wrote:
> > > + if (xenidc_buffer_resource_provider_init_or_exit
> > > + (provider, 0)
> > > + != 0) {
> > > + vfree(provider);
> > 
> > using vmalloc/vfree is discouraged unless you must.
>
> 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.
> > You have a lot of empty lines. This function needs no empty lines, for
> > example, except maybe after the variable declarations. Also, does
> > 'list' need to be reference counted here?
>
> I'm used to a lot of empty lines. I can get rid of them all if you
> like.
I would like it, but I'm not the one who will end up deciding whether
to commit it or not ;-)
Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] importerror with unstable , nico isamu
Next by Date: Re: [Xen-devel] [PATCH][1/17] USB virt 2.6 split driver---xenidc platform , harry
Previous by Thread: Re: [Xen-devel] [PATCH][2/17] USB virt 2.6 split driver---xenidc buffer resource provider , Harry Butterworth
Next by Thread: Re: [Xen-devel] [PATCH][2/17] USB virt 2.6 split driver---xenidc buffer resource provider , Keir Fraser
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /