qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
@ 2012-06-14 12:35 YeongKyoon Lee
  2012-06-15 19:20 ` Blue Swirl
  0 siblings, 1 reply; 30+ messages in thread
From: YeongKyoon Lee @ 2012-06-14 12:35 UTC (permalink / raw)
  To: 陳韋任 (Wei-Ren Chen), Laurent Desnogues
  Cc: qemu-devel@nongnu.org

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/qemu-devel@nongnu.org/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)<chenwj@iis.sinica.edu.tw>
Date : 2012-06-14 12:31 (GMT+09:00)
Title : Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?

> 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:
> 
> http://www.mail-archive.com/qemu-devel@nongnu.org/msg91294.html

  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 Lee 

S-Core Co., Ltd.
D.L.: +82-31-696-7249
M.P.: +82-10-9965-1265
__________________________________

^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
@ 2012-06-20  7:57 陳韋任 (Wei-Ren Chen)
  2012-06-22  9:58 ` Xin Tong
  0 siblings, 1 reply; 30+ messages in thread
From: 陳韋任 (Wei-Ren Chen) @ 2012-06-20  7:57 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

  CC'ed to the mailing list.

-- 
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

[-- Attachment #2: Type: message/rfc822, Size: 4685 bytes --]

From: Orit Wasserman <owasserm@redhat.com>
To: "\"陳韋任 (Wei-Ren Chen)\"" <chenwj@iis.sinica.edu.tw>
Subject: Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
Date: Tue, 19 Jun 2012 12:01:08 +0300
Message-ID: <4FE03FD4.4070508@redhat.com>

On 06/19/2012 11:49 AM, 陳韋任 (Wei-Ren Chen) wrote:
>   Mind me CC this to ML? :)
sure I will read the threads to understand more.

Orit
> 
>> Well it was a while back (2008-9) ,the company was acquired by IBM a year later :
>> http://www.linux-kvm.org/wiki/images/9/98/KvmForum2008%24kdf2008_2.pdf
>> I think stefan Hanjoczi worked there ...
>> The company used the technology for cross platform guest support but claim to get speedup too
>> (for ppc) don't think the speedup was related to mmu but more to the instruction stream.
>> I hope this is helpful.
> 
>   Thanks.
>  
>> Do you have performance result for the cost of the address translation ?
>> If I understand you are concentrating on ARM ?
> 
>   The whole discussion thread is on [1], and you can get some feel about
> the cost of address translation here [2]. Yes, ARM is our target right now,
> but I think we are not limit to it. 
> 
> Regards,
> chenwj
> 
> [1] http://www.mail-archive.com/qemu-devel@nongnu.org/msg116159.html
> [2] http://www.mail-archive.com/qemu-devel@nongnu.org/msg116404.html
> 

^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
@ 2012-06-18  4:59 YeongKyoon Lee
  2012-06-18 19:21 ` Blue Swirl
  0 siblings, 1 reply; 30+ messages in thread
From: YeongKyoon Lee @ 2012-06-18  4:59 UTC (permalink / raw)
  To: Blue Swirl
  Cc: Laurent Desnogues, qemu-devel@nongnu.org,
	陳韋任 (Wei-Ren Chen)

> 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 had considered the approach of sharing slow path, actually argument settings for ld/st helper functions.
However, the problem is that we don't know which runtime registers having arguments.

There are three possible solutions for sharing, I think.
1. Using code stub table including all the possible argument register combinations 
2. Using register information flag constant generated at TCG time, and a special stub which parsing the flag and setting the arguments
3. Setting the arguments commonly for fast and slow paths, which needs additional stack or register cleanup for fast path

I think the solution #2 looks better for performance, however, it could be implemented using jump and assembly because using call could come together with unwanted code and register clobber by the prolog of callee.
But it might be painful of implementing the parsing stub using assembly (or code generation). It is the weak point of solution #2.

How do you think about it?

__________________________________
Principal Engineer 
VM Team 
Yeongkyoon Lee 

S-Core Co., Ltd.
D.L.: +82-31-696-7249
M.P.: +82-10-9965-1265
__________________________________

^ permalink raw reply	[flat|nested] 30+ messages in thread
* Re: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
@ 2012-06-15  2:10 YeongKyoon Lee
  0 siblings, 0 replies; 30+ messages in thread
From: YeongKyoon Lee @ 2012-06-15  2:10 UTC (permalink / raw)
  To: Llu?s Vilanova, 陳韋任 (Wei-Ren Chen)
  Cc: Stefan Hajnoczi, qemu-devel@nongnu.org

[-- Attachment #1: Type: text/html, Size: 2969 bytes --]

[-- Attachment #2: 201206151110961_PYMC4CBB.gif --]
[-- Type: image/gif, Size: 10014 bytes --]

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time?
@ 2012-06-13  3:14 陳韋任 (Wei-Ren Chen)
  2012-06-13  9:18 ` Stefan Hajnoczi
  2012-06-13 10:43 ` Laurent Desnogues
  0 siblings, 2 replies; 30+ messages in thread
From: 陳韋任 (Wei-Ren Chen) @ 2012-06-13  3:14 UTC (permalink / raw)
  To: qemu-devel

Hi all,

  I suspect that guest memory access (qemu_ld/qemu_st) account for the major of
time spent in system mode. I would like to know precisely how much (if possible).
We use tools like perf [1] before, but since the logic of guest memory access aslo
embedded in the host binary not only helper functions, the result cannot be
relied. The current idea is adding helper functions before/after guest memory
access logic. Take ARM guest on x86_64 host for example, should I add the helper
functions before/after tcg_gen_qemu_{ld,st} in target-arm/translate.c or
tcg_out_qemu_{ld,st} in tcg/i386/tcg-target.c? Or there is a better way to know
how much time QEMU spend on handling guest memory access?

  Any suggestion/comment is welcomed. Thanks!

Regards,
chenwj

[1] https://perf.wiki.kernel.org/index.php/Main_Page

-- 
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

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2012-06-24  6:14 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 12:35 [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time? YeongKyoon Lee
2012-06-15 19:20 ` Blue Swirl
2012-06-18  6:57   ` 陳韋任 (Wei-Ren Chen)
2012-06-18 19:28     ` Blue Swirl
  -- strict thread matches above, loose matches on Subject: below --
2012-06-20  7:57 陳韋任 (Wei-Ren Chen)
2012-06-22  9:58 ` Xin Tong
2012-06-24  6:13   ` Blue Swirl
2012-06-18  4:59 YeongKyoon Lee
2012-06-18 19:21 ` Blue Swirl
2012-06-15  2:10 YeongKyoon Lee
2012-06-13  3:14 陳韋任 (Wei-Ren Chen)
2012-06-13  9:18 ` Stefan Hajnoczi
2012-06-13 12:43   ` Lluís Vilanova
2012-06-14  3:29     ` 陳韋任 (Wei-Ren Chen)
2012-06-14 23:17       ` Lluís Vilanova
2012-06-13 10:43 ` Laurent Desnogues
2012-06-14  3:18   ` 陳韋任 (Wei-Ren Chen)
2012-06-14 22:30     ` Lluís Vilanova
2012-06-15  8:23       ` Laurent Desnogues
2012-06-15 19:10         ` Lluís Vilanova
2012-06-18  8:28     ` 陳韋任 (Wei-Ren Chen)
2012-06-18 19:36       ` Blue Swirl
2012-06-18 20:26         ` Lluís Vilanova
2012-06-19  7:52           ` 陳韋任 (Wei-Ren Chen)
2012-06-19  9:35             ` Michael.Kang
2012-06-19  9:47           ` Michael.Kang
2012-06-19 10:51             ` Lluís Vilanova
2012-06-18 19:38       ` Lluís Vilanova
     [not found]       ` <20120619075534.GB34488@cs.nctu.edu.tw>
     [not found]         ` <4FE0347A.9040309@redhat.com>
     [not found]           ` <20120619084939.GA37515@cs.nctu.edu.tw>
2012-06-19  9:01             ` Orit Wasserman
2012-06-14  3:31   ` 陳韋任 (Wei-Ren Chen)

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).