All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Donohue <qemu-devel@PaulSD.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PATCH 0/2] qemu-timer/mc146818rtc: fix timer issues related to clock changes
Date: Fri, 12 Jun 2015 10:05:41 -0400	[thread overview]
Message-ID: <cover.1434067302.git.git@PaulSD.com> (raw)

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

             reply	other threads:[~2015-06-12 14:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 14:05 Paul Donohue [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1434067302.git.git@PaulSD.com \
    --to=qemu-devel@paulsd.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.