How to measure guest memory access (qemu_ld/qemu_st) time?
Hi,
I proposed QEMU ld/st optimizations two times, late last year and early this year, however, there was no replies and even more 0/3 patch mail in this year has been missed so I cannot find the mail in QEMU mail archives. :( The link of 0/3 (http://www.mail-archive.com/[email protected]/msg91294.html) is old one in last year.
Anyway, the other links of patches (1/3~3/3) are as follows.
http://lists.nongnu.org/archive/html/qemu-devel/2012-01/msg00026.html
http://lists.nongnu.org/archive/html/qemu-devel/2012-01/msg00027.html
http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg00028.html
Because there was no replies from qemu-devel, I have applied the patches only to Tizen emulator, where Tizen is a new mobile platform of Linux foundation. At this time, QEMU mainline has been changed since the patches, so I'll propose them again after some modification for latest sources.
Thanks.
------- Original Message -------
Sender : 陳韋任 (Wei-Ren Chen)<[email protected]>
Date : 2012-06-14 12:31 (GMT+09:00)
Title : Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
Quoted 5 lines
As a side note, it might be interesting to gather statistics about the hit rate of the QEMU TLB. Another thing to consider is speeding up the fast path; see YeongKyoon Lee RFC patch:
I only see PATCH 0/3, any idea on where the others?
Regards,
chenwj
Signature · 15 lines
Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj __________________________________ Principal Engineer VM Team Yeongkyoon Lee S-Core Co., Ltd. D.L.: +82-31-696-7249 M.P.: +82-10-9965-1265 __________________________________
Quoted 5 lines · YeongKyoon Lee
Hi,
I proposed QEMU ld/st optimizations two times, late last year and early this year, however, there was no replies and even more 0/3 patch mail in this year has been missed so I cannot find the mail in QEMU mail archives. :( The link of 0/3 (http://www.mail-archive.com/[email protected]/msg91294.html) is old one in last year.
Quoted 7 lines
Anyway, the other links of patches (1/3~3/3) are as follows.
http://lists.nongnu.org/archive/html/qemu-devel/2012-01/msg00026.html
http://lists.nongnu.org/archive/html/qemu-devel/2012-01/msg00027.html
http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg00028.htmlBecause there was no replies from qemu-devel, I have applied the patches only to Tizen emulator, where Tizen is a new mobile platform of Linux foundation. At this time, QEMU mainline has been changed since the patches, so I'll propose them again after some modification for latest sources.
The idea looks nice, but instead of different TLB functions selected at configure time, the optimization should be enabled by default.
Maybe a 'call' instruction could be used to jump to the slow path, that way the slow path could be shared.
Quoted 35 lines
Thanks.
------- Original Message -------
Sender : 陳韋任 (Wei-Ren Chen)<[email protected]>
Date : 2012-06-14 12:31 (GMT+09:00)
Title : Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?Quoted 5 lines
As a side note, it might be interesting to gather statistics about the hit rate of the QEMU TLB. Another thing to consider is speeding up the fast path; see YeongKyoon Lee RFC patch:
I only see PATCH 0/3, any idea on where the others?
Regards,
chenwj--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj__________________________________
Principal Engineer
VM Team
Yeongkyoon LeeS-Core Co., Ltd.
D.L.: +82-31-696-7249
M.P.: +82-10-9965-1265
__________________________________
Quoted 5 lines
The idea looks nice, but instead of different TLB functions selected at configure time, the optimization should be enabled by default.
Maybe a 'call' instruction could be used to jump to the slow path, that way the slow path could be shared.
I don't understand what "maybe a 'call' instruction could be used to jump to
the slow path", could you elaborate on that? From YeongKyoon's cover letter [1], the current flow is,
(1) TLB check
(2) If hit fall through, else jump to TLB miss case (5)
(3) TLB hit case: Load value from host memory
(4) Jump to next code (6)
(5) TLB miss case: call MMU helper
(6) ... (next code)
Do you mean we directly call MMU helper ing step 2?
Regards,
chenwj
[1] http://www.mail-archive.com/[email protected]/msg91294.html
Signature · 5 lines
Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
Quoted 10 lines · 陳韋任 (Wei-Ren Chen)
Quoted 5 lines
The idea looks nice, but instead of different TLB functions selected at configure time, the optimization should be enabled by default.
Maybe a 'call' instruction could be used to jump to the slow path, that way the slow path could be shared.
I don't understand what "maybe a 'call' instruction could be used to jump to the slow path", could you elaborate on that? From YeongKyoon's cover letter [1], the current flow is,
Quoted 6 lines
(1) TLB check
(2) If hit fall through, else jump to TLB miss case (5)
(3) TLB hit case: Load value from host memory
(4) Jump to next code (6)
(5) TLB miss case: call MMU helper
(6) ... (next code)
AFAICT, with the patches, the flow would become
(1) TLB check
(2) If hit fall through, else jump to TLB miss case (5)
(3) TLB hit case: Load value from host memory
(4) ... (next code)
Later generated:
(5) TLB miss case: call MMU helper
(6) Jump back to (4)
Quoted 2 lines
Do you mean we directly call MMU helper ing step 2?
Not really. But the interface between the helper and the generated code could be optimized, for example to get rid of the redundant TLB check or pass around already calculated values.
Quoted 12 lines
Regards,
chenwj[1] http://www.mail-archive.com/[email protected]/msg91294.html
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj