From mboxrd@z Thu Jan 1 00:00:00 1970 From: harry Subject: Re: [PATCH][2/17] USB virt 2.6 split driver---xenidc buffer resource provider Date: Tue, 22 Nov 2005 11:11:30 +0000 Message-ID: <1132657890.5956.16.camel@localhost.localdomain> References: <1132579125.31295.113.camel@localhost.localdomain> <20051121201811.GB22728@granada.merseine.nu> <1132608600.4739.24.camel@localhost> <20051122105506.GG25081@granada.merseine.nu> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20051122105506.GG25081@granada.merseine.nu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Muli Ben-Yehuda Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, 2005-11-22 at 12:55 +0200, Muli Ben-Yehuda wrote: > 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. OK > > > > 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 ;-) Well, If they give me some feedback, I can do what they want. > > Cheers, > Muli