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] query the page type of a hvm page from within a hvm gues

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] query the page type of a hvm page from within a hvm guest
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 2 May 2011 11:56:48 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Delivery-date: Mon, 02 May 2011 02:58:07 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1304330211; l=831; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=nIfdpaWw0T1esx8HVC1y5VUWYPg=; b=xE9Fw5NFA8Oj7jXp1iJlw3TFkv8WqcoBpWIsX4vJl/19EcpkgpPUOsueK5aUIHyvbLe AIopJcIaPvphX05RlJSupnNa5yFVINYUxptEkBEpk2IxJX/dr7IpntPMf4VyFJvPqcm0u Dmx5MKVsMbonLFROx9DEwR7Bc3Vk0+q8rEc=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DBE98FF020000780003F22F@xxxxxxxxxxxxxxxxxx>
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: <20110407101202.GA31553@xxxxxxxxx> <20110407111602.GI30961@xxxxxxxxxxxxxxxxxxxxxxx> <20110502091744.GA15606@xxxxxxxxx> <4DBE98FF020000780003F22F@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, May 02, Jan Beulich wrote:

> > +   if (get_mem_type_supported)
> 
> The name of the variable seems badly chosen, and the way you
> coded this the code wouldn't be able to use the new interface
> after migrating from an incapable hypervisor to a capable one.

For the plain kdump usage thats probably ok. I think ballooned out
oldmem pages will turn into ram pages during migration, but I'm not sure.

> > +           return -ENXIO;
> > +
> > +   if (pfn == prev_pfn)
> > +           return prev_mem_type == HVMMEM_ram_rw;
> 
> Did you in fact observe many immediately subsequent calls with
> the same input (i.e. is the caching really worthwhile)?

It depends on how expensive a hypercall is.
read_from_oldmem() did read full pages in my testing.
I think removing the caching and do the hypercall unconditional is ok.

Olaf


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