All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] qemu-timer/mc146818rtc: fix timer issues related to clock changes
@ 2015-06-12 14:05 Paul Donohue
  2015-06-12 14:08 ` [Qemu-devel] [PATCH 1/2] qemu-timer: Call clock reset notifiers on forward jumps Paul Donohue
  2015-06-12 14:10 ` [Qemu-devel] [PATCH 2/2] mc146818rtc: Reset the periodic timer on load Paul Donohue
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Donohue @ 2015-06-12 14:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

If the host clock jumps forward or backward without resetting the mc146818rtc's 
periodic timer, the periodic timer interrupts will either fire rapidly 
(consuming host CPU and blocking operation of the VM) until the timer catches 
up to the new host clock, or will stall until the host clock catches up with 
the prior date used by the periodic timer.

A "reset notifier" mechanism was introduced a while back that resets the 
mc146818rtc's periodic timer if the host clock jumps backward while the VM is 
running.  However, the timer is not reset if the host clock jumps forward while 
the VM is running, or if the clock jumps either forward or backward when 
loading a snapshot or migration.

In one test case, when loading a 3 week old snapshot, the timer loop consumed 
CPU and blocked the VM for nearly 90 seconds.

The following patches fix this issue by resetting the timer in these cases.

Paul Donohue (2):
  qemu-timer: Call clock reset notifiers on large forward jumps
  mc146818rtc: Reset the periodic timer on resume from snapshot

 hw/timer/mc146818rtc.c | 6 ++++++
 include/qemu/timer.h   | 9 +++++++++
 qemu-timer.c           | 2 +-
 3 files changed, 16 insertions(+), 1 deletion(-)

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

end of thread, other threads:[~2015-06-18 14:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 14:05 [Qemu-devel] [PATCH 0/2] qemu-timer/mc146818rtc: fix timer issues related to clock changes Paul Donohue
2015-06-12 14:08 ` [Qemu-devel] [PATCH 1/2] qemu-timer: Call clock reset notifiers on forward jumps Paul Donohue
2015-06-17 14:00   ` Paolo Bonzini
2015-06-18 12:58     ` Paul Donohue
2015-06-18 13:17       ` Paolo Bonzini
2015-06-12 14:10 ` [Qemu-devel] [PATCH 2/2] mc146818rtc: Reset the periodic timer on load Paul Donohue
2015-06-17 14:01   ` Paolo Bonzini
2015-06-18 14:36     ` Paul Donohue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.