xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
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: Mon, 6 Jul 2015 20:21:39 +0800 (CST)	[thread overview]
Message-ID: <1132173887.109164.1436185299238.JavaMail.tomcat@nfs.iscas.ac.cn> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2028 bytes --]




在 2015-07-06, Mon, 16:11:02 ,Andrew Cooper 写到:


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

	&nbsp;


	
		
		
		
		在 2015-07-06, Mon, 15:44:53 ,Andrew Cooper 写到:
		
			On 06/07/2015 08:22, xinyue wrote:
		
			&nbsp;
		
			
				Hi,
				
				&nbsp;&nbsp;&nbsp; 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&#39;t cooled sufficiently, which is the first problem.
		
		
			
				
				The codes I used as below:
				&nbsp;&nbsp;&nbsp; uint32_t pfec = PFEC_page_present;
				&nbsp;&nbsp;&nbsp; unsigned long gfn;
				&nbsp;&nbsp;&nbsp; unsigned long mfn;
				&nbsp;&nbsp;&nbsp; unsigned long virtaddr;
				&nbsp;&nbsp;&nbsp; struct vcpu *vcpu = current;
				&nbsp;&nbsp;&nbsp; struct domain *d = vcpu-&gt;domain;
				
				&nbsp;&nbsp;&nbsp; gfn = paging_gva_to_gfn(current, 0xc0290000, &amp;pfec);
				&nbsp;&nbsp;&nbsp; mfn = get_gfn(d, gfn, &amp;t);
				&nbsp;&nbsp;&nbsp; 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.&nbsp; There is no getting around this.
		
		Your performance problems will be caused by performing the operation far too often.&nbsp; 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 &nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp; Yes, you are right. I added printk in get_gfn and found it was call many times. I&#39;ll check why that happens. Thanks a lot!


xinyue

[-- Attachment #1.2: Type: text/html, Size: 3290 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

             reply	other threads:[~2015-07-06 12:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 12:21 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-07  1:46 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=1132173887.109164.1436185299238.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 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).