From: xinyue <xinyue@nfs.iscas.ac.cn>
To: "andrew.cooper3" <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Performance problem about address translation
Date: Tue, 7 Jul 2015 09:46:47 +0800 (CST) [thread overview]
Message-ID: <115366142.109238.1436233607072.JavaMail.tomcat@nfs.iscas.ac.cn> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2708 bytes --]
在 2015-07-06, Mon, 16:11:02 ,Andrew Cooper 写到:
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;
p2m_type_t t;
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
Yes, you are right. I added printk in get_gfn and found it was call many times. I'll check why that happens. Thanks a lot!
Sorry for mistaking it, the calls of these functions in log appear before I invoke them. These functions that I invoked are through hypercall in HVM DomU, through the log I think I invoked them only once. Maybe the performance problem is caused by the parameters I used? Could you help me the check if I used them unproperly as posted before.
Another question is when I add printk in paging_gva_to gfn function, the performance alse down serioursly that it can't even boot hvm domu successfully. I am wondering why.
Thanks again and best regards!
xinyue
[-- Attachment #1.2: Type: text/html, Size: 4039 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 reply other threads:[~2015-07-07 2:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 1:46 xinyue [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-07 3:24 Performance problem about address translation 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-06 12:21 xinyue
2015-07-06 7:58 xinyue
2015-07-06 8:37 ` Andrew Cooper
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=115366142.109238.1436233607072.JavaMail.tomcat@nfs.iscas.ac.cn \
--to=xinyue@nfs.iscas.ac.cn \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.