All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xinyue@nfs.iscas.ac.cn, "ian.campbell" <ian.campbell@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: Performance problem about address translation
Date: Mon, 06 Jul 2015 09:11:36 +0100	[thread overview]
Message-ID: <559A3838.3080604@citrix.com> (raw)
In-Reply-To: <1064283602.109093.1436167378616.JavaMail.tomcat@nfs.iscas.ac.cn>


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

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.

~Andrew

[-- Attachment #1.2: Type: text/html, Size: 2251 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  8:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06  7:22 Performance problem about address translation xinyue
2015-07-06  8:11 ` Andrew Cooper [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-07-06  7:58 xinyue
2015-07-06  8:37 ` Andrew Cooper
2015-07-06 12:21 xinyue
2015-07-07  1:46 xinyue
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

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=559A3838.3080604@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=ian.campbell@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 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.