[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 5/7] xen-gntdev: Add reference counting to maps



On Tue, 11 Jan 2011, Konrad Rzeszutek Wilk wrote:
> 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.
> 

"xen-gntdev: Remove unneeded structures from grant_map tracking data" is
a nice cleanup but I'd rather keep it separate from "xen gntdev: use
gnttab_map_refs and gnttab_unmap_refs" that introduces a new
functionality (the usage of gnttab_map_refs and gnttab_unmap_refs).

But I could import just the bit that collapses all the kzalloc's in one.

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.