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: [Xen-devel] [PATCH 5/7] xen-gntdev: Add reference counting to maps

On Tue, Jan 11, 2011 at 11:10:23AM +0000, Stefano Stabellini wrote:
> On Mon, 10 Jan 2011, Konrad Rzeszutek Wilk wrote:
> > > -static void gntdev_free_map(struct grant_map *map)
> > > -{
> > > - unsigned i;
> > > + atomic_sub(map->count, &pages_mapped);
> > >  
> > > - if (!map)
> > > -         return;
> > > + if (!use_ptemod)
> > > +         unmap_grant_pages(map, 0, map->count);
> > >  
> > >   for (i = 0; i < map->count; i++) {
> > >           if (map->pages[i])
> > >                   __free_page(map->pages[i]);
> > >   }
> > > + kfree(map->pages);
> > 
> > Can you roll that in the previous patch that introduced the map->pages code?
> > 
> 
> map->pages is actually introduced by "xen gntdev: use gnttab_map_refs
> and gnttab_unmap_refs" in my patch series and it already has a

Right. But I meant his patch that collapsed all of the different kzalloc's in 
just one.

> kfree(map->pages) in gntdev_free_map.
> In fact I think reading this chuck of the patch on its own is misleading
> because as you can see the whole gntdev_free_map function has been
> removed...

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

<Prev in Thread] Current Thread [Next in Thread>