* [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC
@ 2012-03-02 6:58 Zhang, Yang Z
0 siblings, 0 replies; 7+ messages in thread
From: Zhang, Yang Z @ 2012-03-02 6:58 UTC (permalink / raw)
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini, aliguori@us.ibm.com, Marcelo Tosatti, Jan Kiszka,
kvm@vger.kernel.org
Changes in v3:
Rebase to latest head.
Remove the logic to update time format when DM bit changed.
Allow to migrate from old version.
Solve the async when reading UF and UIP
Changes in v2:
Add UIP check logic.
Add logic that next second tick will occur in exactly 500ms later after reset divider
Current RTC emulation uses periodic timer(2 timers per second) to update RTC clock. And it will stop CPU staying at deep C-state for long period. Our experience shows the Pkg C6 residency reduced 6% when running 64 idle guest.
The following patch stop the two periodic timer and only updating RTC clock when guest try to read it.
---
Yang Zhang (7):
RTC: Remove the logic to update time format when DM bit changed
RTC: Update the RTC clock only when reading it
RTC: Add UIP(update in progress) check logic
RTC: Set internal millisecond register to 500ms when reset divider
RTC: Add RTC update-ended interrupt support
RTC: Add alarm support
RTC: Allow to migrate from old version
hw/mc146818rtc.c | 427 ++++++++++++++++++++++++++++++++++-------------------
1 files changed, 274 insertions(+), 153 deletions(-)
best regards
yang
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC
@ 2012-03-14 0:00 Zhang, Yang Z
2012-03-14 8:34 ` Paolo Bonzini
0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Yang Z @ 2012-03-14 0:00 UTC (permalink / raw)
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini, aliguori@us.ibm.com, Marcelo Tosatti, Jan Kiszka,
kvm@vger.kernel.org
Is there any comments with the version 3?
best regards
yang
> -----Original Message-----
> From: Zhang, Yang Z
> Sent: Friday, March 02, 2012 2:59 PM
> To: qemu-devel@nongnu.org
> Cc: Jan Kiszka; kvm@vger.kernel.org; kvm@vger.kernel.org; aliguori@us.ibm.com;
> Paolo Bonzini; Marcelo Tosatti
> Subject: [PATCH v3 0/7] RTC: New logic to emulate RTC
>
> Changes in v3:
> Rebase to latest head.
> Remove the logic to update time format when DM bit changed.
> Allow to migrate from old version.
> Solve the async when reading UF and UIP
>
> Changes in v2:
> Add UIP check logic.
> Add logic that next second tick will occur in exactly 500ms later after reset divider
>
> Current RTC emulation uses periodic timer(2 timers per second) to update RTC
> clock. And it will stop CPU staying at deep C-state for long period. Our experience
> shows the Pkg C6 residency reduced 6% when running 64 idle guest.
> The following patch stop the two periodic timer and only updating RTC clock
> when guest try to read it.
> ---
> Yang Zhang (7):
> RTC: Remove the logic to update time format when DM bit changed
> RTC: Update the RTC clock only when reading it
> RTC: Add UIP(update in progress) check logic
> RTC: Set internal millisecond register to 500ms when reset divider
> RTC: Add RTC update-ended interrupt support
> RTC: Add alarm support
> RTC: Allow to migrate from old version
>
> hw/mc146818rtc.c | 427
> ++++++++++++++++++++++++++++++++++-------------------
> 1 files changed, 274 insertions(+), 153 deletions(-)
>
> best regards
> yang
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC
2012-03-14 0:00 [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC Zhang, Yang Z
@ 2012-03-14 8:34 ` Paolo Bonzini
2012-03-14 8:52 ` Zhang, Yang Z
0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2012-03-14 8:34 UTC (permalink / raw)
To: Zhang, Yang Z
Cc: aliguori@us.ibm.com, Marcelo Tosatti, Jan Kiszka,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Il 14/03/2012 01:00, Zhang, Yang Z ha scritto:
> Is there any comments with the version 3?
Can you explain why you dropped the logic to set the timer to the next
event?
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC
2012-03-14 8:34 ` Paolo Bonzini
@ 2012-03-14 8:52 ` Zhang, Yang Z
2012-03-14 8:54 ` Paolo Bonzini
0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Yang Z @ 2012-03-14 8:52 UTC (permalink / raw)
To: Paolo Bonzini
Cc: aliguori@us.ibm.com, Marcelo Tosatti, Jan Kiszka,
qemu-devel@nongnu.org, kvm@vger.kernel.org
> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
> Sent: Wednesday, March 14, 2012 4:35 PM
> To: Zhang, Yang Z
> Cc: qemu-devel@nongnu.org; Jan Kiszka; kvm@vger.kernel.org;
> aliguori@us.ibm.com; Marcelo Tosatti
> Subject: Re: [PATCH v3 0/7] RTC: New logic to emulate RTC
>
> Il 14/03/2012 01:00, Zhang, Yang Z ha scritto:
> > Is there any comments with the version 3?
>
> Can you explain why you dropped the logic to set the timer to the next
> event?
Do you mean why I change the rtc logic? The reason is that: When a guest is idle, the main activity inside qemu is the rtc update timer(2 per second). In our experience(running 64 rhel6u1 guests), it will decrease pkg C6 residency about 6%(6% means 2 watts in my box). And normally, the guest will not use the update-end interrupt and alarm. So there has no need to run a periodic timer when guest isn't using it.
best regards
yang
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC
2012-03-14 8:52 ` Zhang, Yang Z
@ 2012-03-14 8:54 ` Paolo Bonzini
2012-03-15 0:06 ` Zhang, Yang Z
0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2012-03-14 8:54 UTC (permalink / raw)
To: Zhang, Yang Z
Cc: aliguori@us.ibm.com, Marcelo Tosatti, Jan Kiszka,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Il 14/03/2012 09:52, Zhang, Yang Z ha scritto:
>>>>> Is there any comments with the version 3?
>>>
>>> Can you explain why you dropped the logic to set the timer to the
>>> next event?
> Do you mean why I change the rtc logic? The reason is that: When a
> guest is idle, the main activity inside qemu is the rtc update
> timer(2 per second). In our experience(running 64 rhel6u1 guests), it
> will decrease pkg C6 residency about 6%(6% means 2 watts in my box).
> And normally, the guest will not use the update-end interrupt and
> alarm. So there has no need to run a periodic timer when guest isn't
> using it.
No, why you're keeping roughly the same logic as current QEMU, instead
of the more radical changes that were in v2.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC
2012-03-14 8:54 ` Paolo Bonzini
@ 2012-03-15 0:06 ` Zhang, Yang Z
2012-03-15 9:34 ` Paolo Bonzini
0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Yang Z @ 2012-03-15 0:06 UTC (permalink / raw)
To: Paolo Bonzini
Cc: aliguori@us.ibm.com, Marcelo Tosatti, Jan Kiszka,
qemu-devel@nongnu.org, kvm@vger.kernel.org
> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
> Sent: Wednesday, March 14, 2012 4:54 PM
> To: Zhang, Yang Z
> Cc: qemu-devel@nongnu.org; Jan Kiszka; kvm@vger.kernel.org;
> aliguori@us.ibm.com; Marcelo Tosatti
> Subject: Re: [PATCH v3 0/7] RTC: New logic to emulate RTC
>
> Il 14/03/2012 09:52, Zhang, Yang Z ha scritto:
> >>>>> Is there any comments with the version 3?
> >>>
> >>> Can you explain why you dropped the logic to set the timer to the
> >>> next event?
> > Do you mean why I change the rtc logic? The reason is that: When a
> > guest is idle, the main activity inside qemu is the rtc update
> > timer(2 per second). In our experience(running 64 rhel6u1 guests), it
> > will decrease pkg C6 residency about 6%(6% means 2 watts in my box).
> > And normally, the guest will not use the update-end interrupt and
> > alarm. So there has no need to run a periodic timer when guest isn't
> > using it.
>
> No, why you're keeping roughly the same logic as current QEMU, instead
> of the more radical changes that were in v2.
You are right. Actually, the v4 is ready and it uses the same logic with v2. Since I have other high priority task in hand, I don't test v4 too much. So i plan to delay it for a while and hope v3 can be accepted before v4 is ready.
If you really doesn't like the v3, I will pay more effort in v4 and will send out it ASAP. :)
best regards
yang
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC
2012-03-15 0:06 ` Zhang, Yang Z
@ 2012-03-15 9:34 ` Paolo Bonzini
0 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2012-03-15 9:34 UTC (permalink / raw)
To: Zhang, Yang Z
Cc: aliguori@us.ibm.com, Marcelo Tosatti, Jan Kiszka,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Il 15/03/2012 01:06, Zhang, Yang Z ha scritto:
> You are right. Actually, the v4 is ready and it uses the same logic
> with v2. Since I have other high priority task in hand, I don't test
> v4 too much. So i plan to delay it for a while and hope v3 can be
> accepted before v4 is ready. If you really doesn't like the v3, I
> will pay more effort in v4 and will send out it ASAP. :)
Thanks, that would be great!
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-15 9:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 0:00 [Qemu-devel] [PATCH v3 0/7] RTC: New logic to emulate RTC Zhang, Yang Z
2012-03-14 8:34 ` Paolo Bonzini
2012-03-14 8:52 ` Zhang, Yang Z
2012-03-14 8:54 ` Paolo Bonzini
2012-03-15 0:06 ` Zhang, Yang Z
2012-03-15 9:34 ` Paolo Bonzini
-- strict thread matches above, loose matches on Subject: below --
2012-03-02 6:58 Zhang, Yang Z
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).