From: xinyue Subject: Re: Performance problem about address translation Date: Mon, 6 Jul 2015 15:58:51 +0800 (CST) Message-ID: <945896100.109123.1436169531322.JavaMail.tomcat@nfs.iscas.ac.cn> Reply-To: xinyue@nfs.iscas.ac.cn Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6942915746180959664==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZC1kl-0006Fk-Ap for xen-devel@lists.xenproject.org; Mon, 06 Jul 2015 08:27:51 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "andrew.cooper3" Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============6942915746180959664== Content-Type: multipart/alternative; boundary="----=_Part_109122_1650885620.1436169531312" ------=_Part_109122_1650885620.1436169531312 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =E5=9C=A8 2015-07-06, Mon, 15:44:53 ,Andrew Cooper =E5=86=99=E5=88=B0=EF=BC= =9A =09On 06/07/2015 08:22, xinyue wrote: =09  =09 =09=09Hi, =09=09 =09=09    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 becom= e very hot and then I have to force the machine shutting down. =09=09 Your machine clearly isn't cooled sufficiently, which is the first prob= lem. =09 =09=09 =09=09The codes I used as below: =09=09    uint32_t pfec =3D PFEC_page_present; =09=09    unsigned long gfn; =09=09    unsigned long mfn; =09=09    unsigned long virtaddr; =09=09    struct vcpu *vcpu =3D current; =09=09    struct domain *d =3D vcpu->domain; =09=09 =09=09    gfn =3D paging_gva_to_gfn(current, 0xc0290000, &am= p;pfec); =09=09    mfn =3D get_gfn(d, gfn, &t); =09=09    virtaddr =3D map_domain_page(mfn_x(mfn)); =09=09 =09=09I also use the dbg_hvm_va2mfn function in debug.c, performance proble= m still present. =09=09 Walking pagetables in software is slow.  There is no getting around th= is. Your performance problems will be caused by performing the operation far to= o often.  You should find a way to reduce this. Thanks very much, I think I only do this for just once. And after the thans= lation is done, the performance is not turn to normal. Does that mean that = if I wait long enough it will recovery? ~Andrew ------=_Part_109122_1650885620.1436169531312 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



=E5=9C=A8 2015-07-06, Mon, 15:44:53 ,Andrew Cooper =E5=86=99=E5=88=B0=EF=BC= =9A
=09On 06/07/2015 08:22, xinyue wrote:
=09 
=09
=09=09Hi,
=09=09
=09=09    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 becom= e very hot and then I have to force the machine shutting down.
=09=09

Your machine clearly isn't cooled sufficiently, which is the first prob= lem.

=09
=09=09
=09=09The codes I used as below: =09=09    uint32_t pfec =3D PFEC_page_present;
=09=09    unsigned long gfn;
=09=09    unsigned long mfn;
=09=09    unsigned long virtaddr;
=09=09    struct vcpu *vcpu =3D current;
=09=09    struct domain *d =3D vcpu->domain;
=09=09
=09=09    gfn =3D paging_gva_to_gfn(current, 0xc0290000, &am= p;pfec);
=09=09    mfn =3D get_gfn(d, gfn, &t);
=09=09    virtaddr =3D map_domain_page(mfn_x(mfn));
=09=09
=09=09I also use the dbg_hvm_va2mfn function in debug.c, performance proble= m still present.
=09=09

Walking pagetables in software is slow.  There is no getting around th= is.

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




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




~Andrew
------=_Part_109122_1650885620.1436169531312-- --===============6942915746180959664== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============6942915746180959664==--