[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] query the page type of a hvm page from within a hvm guest
- To: Jan Beulich <JBeulich@xxxxxxxxxx>
- 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=
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
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