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] SetPageForeign in netback

To: "Zang Hongyong" <zanghongyong@xxxxxxxxxx>
Subject: Re: [Xen-devel] SetPageForeign in netback
From: "Grzegorz Miłoś" <gm281@xxxxxxxxx>
Date: Wed, 18 Jun 2008 11:52:27 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 18 Jun 2008 03:52:51 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=iiMgy66Kv0vyT/3nVm08TeAlDnMKEdMSPWpwUiqS+AE=; b=gHqyrXY6OKfIL7AzQPlDH4enw4lVxvsZAqQgQN87PrtmmD3De55M0tW5/lyQSEDjNd fPIIEwhZInjQjctYJPZ5//SUqCAegrBAIYMH33M1ip+6Tq/w2kvbG4yeQ2uK+QWtSkAa CBOrRWJgM/TsoqizQ0DVC5YU5k7xXanBf8iIw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=fUATw66woUU1mDVQLx19V8jNAsIemRgSFjbQ49yVNIXd5GrfCyhjMhiC5k7KV1ECMw SJNFOiMFT4YKLECCfS0W+7GiUqcafz9MDuAVK1EoTt//P9tJAwQMj0AVCKdK6rOC2BY0 DGPS2wpBpG8bAU4nCmjVLg6mbVL6c15y8J0/E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080615155616.1D95D136821@xxxxxxxxxx>
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: <20080615155616.1D95D136821@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> hi,
>  in netback init mmap_pages,
>                SetPageForeign(page, netif_page_release);
>  that is, page->index = netif_page_release
>  while netif_page_release is a function.

netif_page_release is a function, and therefore:
page->index = netif_page_release
will store netif_page_release function pointer in 'index'

>  so what's the meaning of SetPageForeign?

Setting a page foreign means that the page is owned by another domain,
and that some care needs to be taken when freeing it.

>  And when the function  netif_page_release() will be called?

Whenever PageForeignDestructor is called (as it calls the destructor
function stored in the 'index' field).
PageForeignDestructor is called from:
__free_pages_ok
and
free_hot_cold_page

Hope this helps.

Cheers
Gr(z)egor(z)

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