From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xinyue@nfs.iscas.ac.cn
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Performance problem about address translation
Date: Mon, 06 Jul 2015 09:37:47 +0100 [thread overview]
Message-ID: <559A3E5B.7080200@citrix.com> (raw)
In-Reply-To: <945896100.109123.1436169531322.JavaMail.tomcat@nfs.iscas.ac.cn>
[-- Attachment #1.1: Type: text/plain, Size: 1528 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 3299 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-07-06 8:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-06 7:58 Performance problem about address translation xinyue
2015-07-06 8:37 ` Andrew Cooper [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-07 3:24 xinyue
2015-07-07 11:49 ` Ian Campbell
2015-07-08 6:13 ` xinyue
2015-07-08 6:26 ` xinyue
2015-07-08 7:43 ` xinyue
2015-07-07 1:46 xinyue
2015-07-06 12:21 xinyue
2015-07-06 7:22 xinyue
2015-07-06 8:11 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=559A3E5B.7080200@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xenproject.org \
--cc=xinyue@nfs.iscas.ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).