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

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 5/7] xen-gntdev: Add reference counting to maps
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Tue, 11 Jan 2011 11:10:23 +0000
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "jeremy@xxxxxxxx" <jeremy@xxxxxxxx>
Delivery-date: Tue, 11 Jan 2011 03:56:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110110222414.GF15016@xxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1292545063-32107-1-git-send-email-dgdegra@xxxxxxxxxxxxx> <1292545063-32107-6-git-send-email-dgdegra@xxxxxxxxxxxxx> <20110110222414.GF15016@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
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
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>