Performance problem about address translation
在 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! And after analyzing the performance of hvm domu, I found a process named "evolution-data-" using almost 99.9% cpu. Does someone known what's this and why it appears? xinyue
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
On Tue, 2015-07-07 at 11:24 +0800, xinyue wrote:
Please don't use HTML mail and do proper ">" quoting
Quoted 3 lines
And after analyzing the performance of hvm domu, I found a process named "evolution-data-" using almost 99.9% cpu. Does someone known what's this and why it appears?
evolution-data-server is part of the evolution mail client. It has nothing to do with Xen I'm afraid so you will have to look elsewhere for why it is taking so much CPU.
Ian.
Quoted 4 lines · Ian Campbell
On Tue, 2015-07-07 at 11:24 +0800, xinyue wrote:
Please don't use HTML mail and do proper ">" quoting
Quoted 9 lines
Quoted 3 lines
And after analyzing the performance of hvm domu, I found a process named "evolution-data-" using almost 99.9% cpu. Does someone known what's this and why it appears?
evolution-data-server is part of the evolution mail client. It has nothing to do with Xen I'm afraid so you will have to look elsewhere for why it is taking so much CPU.
Ian.
Sorry for that and thanks very much.
I think the problem maybe caused by the address
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Very sorry for sending wrong before.
Quoted 9 lines · xinyue
Quoted 7 lines · Ian Campbell
On Tue, 2015-07-07 at 11:24 +0800, xinyue wrote:
Please don't use HTML mail and do proper ">" quoting
Quoted 3 lines
And after analyzing the performance of hvm domu, I found a process named "evolution-data-" using almost 99.9% cpu. Does someone known what's this and why it appears?
Quoted 7 lines
Quoted 6 lines
evolution-data-server is part of the evolution mail client. It has nothing to do with Xen I'm afraid so you will have to look elsewhere for why it is taking so much CPU.
Ian.
Sorry for that and thanks very much.
I think the problem maybe caused by the address alignment. The HVM DomU crashed after the hypercall and Dom0 crashed later sometimes with "Bus error".
I think the function that caused the crash is get_gfn. The related code is
unsigned long gfn;
unsigned long mfn;
struct vcpu *vcpu = current;
struct domain *d = vcpu->domain;
uint32_t pfec = PFEC_page_present;
p2m_type_t t;
gfn = paging_gva_to_gfn(current, 0xc0290000, &pfec);
mfn = get_gfn(d, gfn, &t);Is that I lost some type translation?
Thanks and best regards!
xinyue
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 33 lines · xinyue
Very sorry for sending wrong before.
Quoted 9 lines · xinyue
Quoted 7 lines · Ian Campbell
On Tue, 2015-07-07 at 11:24 +0800, xinyue wrote:
Please don't use HTML mail and do proper ">" quoting
Quoted 3 lines
And after analyzing the performance of hvm domu, I found a process named "evolution-data-" using almost 99.9% cpu. Does someone known what's this and why it appears?
Quoted 7 lines
Quoted 6 lines
evolution-data-server is part of the evolution mail client. It has nothing to do with Xen I'm afraid so you will have to look elsewhere for why it is taking so much CPU.
Ian.
Sorry for that and thanks very much.
I think the problem maybe caused by the address alignment. The HVM DomU crashed after the hypercall and Dom0 crashed later sometimes with "Bus error".
I think the function that caused the crash is
get_gfn. The related code isunsigned long gfn; unsigned long mfn; struct vcpu *vcpu = current; struct domain *d = vcpu->domain; uint32_t pfec = PFEC_page_present; p2m_type_t t; gfn = paging_gva_to_gfn(current, 0xc0290000, &pfec); mfn = get_gfn(d, gfn, &t);
Quoted 6 lines
Is that I lost some type translation?
Thanks and best regards!
xinyue
Thanks for all advices, I found the problem appeared because I forget adding function put_gfn.
Thanks again and best regards!
xinyue
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel