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

Re: [Xen-devel] Performance problem about address translation



On 06/07/2015 08:58, xinyue wrote:



å 2015-07-06, Mon, 15:44:53 ,Andrew Cooper ååï
On 06/07/2015 08:22, xinyue wrote:
Â
Hi,

ÂÂÂ For I want to translate the virtual address in HVM DomU to virtual address in Xen. But when I use the function paging_gva_to_gfn and get_gfn, I can feel the performance down quickly, the machine become very hot and then I have to force the machine shutting down.

Your machine clearly isn't cooled sufficiently, which is the first problem.


The codes I used as below:
ÂÂÂ uint32_t pfec = PFEC_page_present;
ÂÂÂ unsigned long gfn;
ÂÂÂ unsigned long mfn;
ÂÂÂ unsigned long virtaddr;
ÂÂÂ struct vcpu *vcpu = current;
ÂÂÂ struct domain *d = vcpu->domain;

ÂÂÂ gfn = paging_gva_to_gfn(current, 0xc0290000, &pfec);
ÂÂÂ mfn = get_gfn(d, gfn, &t);
ÂÂÂ virtaddr = map_domain_page(mfn_x(mfn));

I also use the dbg_hvm_va2mfn function in debug.c, performance problem still present.

Walking pagetables in software is slow. There is no getting around this.

Your performance problems will be caused by performing the operation far too often. You should find a way to reduce this.




Thanks very much, I think I only do this for just once. And after the thanslation is done, the performance is not turn to normal. Does that mean that if I wait long enough it will recovery?

It almost certainly means you are not doing it just once like you suppose.

~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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