xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Diana Crisan <dcrisan@flexiant.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	David Vrabel <david.vrabel@citrix.com>,
	Alex Bligh <alex@alex.org.uk>,
	Anthony PERARD <anthony.perard@citrix.com>
Subject: Re: HVM Migration of domU on Qemu-upstream DM causes stuck system clock with ACPI
Date: Fri, 31 May 2013 12:41:43 +0100	[thread overview]
Message-ID: <51A88C77.9000107@eu.citrix.com> (raw)
In-Reply-To: <51A8828A.5090804@eu.citrix.com>

On 31/05/13 11:59, George Dunlap wrote:
> [ 248.067326] CE: xen increased min_delta_ns to 225000 nsec
> [  248.067344] CE: xen increased min_delta_ns to 337500 nsec
> [  248.067361] CE: xen increased min_delta_ns to 506250 nsec
> [  248.067378] CE: xen increased min_delta_ns to 759375 nsec
> [  248.067396] CE: xen increased min_delta_ns to 1139062 nsec
> [  248.067413] CE: xen increased min_delta_ns to 1708593 nsec
> [  248.067428] CE: xen increased min_delta_ns to 2562889 nsec
> [  248.067441] CE: xen increased min_delta_ns to 3844333 nsec
> [  248.067453] CE: xen increased min_delta_ns to 4000000 nsec
> [  248.067466] CE: Reprogramming failure. Giving up
> [  248.068075] ata2.00: configured for MWDMA2
>
> Note the "CE: xen increased min_delta_ns to 150000nsec" at 231 for the 
> previous suspend, and now it's increasing it up to 4 milliseconds 
> before giving up for this suspend.
>
> Konrad, stefano, any idea what's going on here?

So it looks like those messages are coming from 
linux.git/kernel/time/clockevents.c.

clockevents_program_events() calls clockevents_program_min_delta(), 
which calls the Xen clock set_next_event (in 
linux.git/arch/x86/xen/time.c) , which calls VCPUOP_set_singleshot_timer 
(which is handled in xen.git/xen/common/domain.c).

If set_next_event() returns an error, it tries again a couple of times, 
then tries increasing the "min_delta" and trying again; eventually it 
wil give up.  So set_next_event() must be returning an error consistently.

The only time that VCPUOP_set_singleshot_timer should return an error is 
if the requrested time is in the past *and* the VCPU_SSHOTTMR_future 
flag is set (which it is apparently).

So it would appear that the VM is down over the period that some event 
wants to happen; and Linux does not contemplate the idea that we may 
have been unable to hit an event within 4ms.

Overall it looks like something we should fix in Linux.  Completely 
giving up on all timers seems much too extreme.  At worst it should just 
drop timers.  Probably what it should do is on each iteration, check to 
see if any events are currently in the past and just fire them 
immediately, taking them off the queue.

  -George

  reply	other threads:[~2013-05-31 11:41 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1223417765.8633857.1368537033873.JavaMail.root@zimbra002>
2013-05-14 13:11 ` HVM Migration of domU on Qemu-upstream DM causes stuck system clock with ACPI Diana Crisan
2013-05-14 16:09   ` George Dunlap
2013-05-15 10:05     ` Diana Crisan
2013-05-15 13:46   ` Alex Bligh
2013-05-20 11:11     ` George Dunlap
2013-05-20 19:28       ` Konrad Rzeszutek Wilk
2013-05-20 22:38         ` Alex Bligh
2013-05-21  1:04           ` Konrad Rzeszutek Wilk
2013-05-21 10:22             ` Diana Crisan
2013-05-21 10:47               ` David Vrabel
2013-05-21 11:16                 ` Diana Crisan
2013-05-21 12:49                   ` David Vrabel
2013-05-21 13:16                     ` Alex Bligh
2013-05-24 16:16                       ` George Dunlap
2013-05-25 10:18                         ` Alex Bligh
2013-05-26  8:38                           ` Ian Campbell
2013-05-28 15:06                             ` Diana Crisan
2013-05-29 16:16                               ` Alex Bligh
2013-05-29 19:04                                 ` Ian Campbell
2013-05-30 14:30                                   ` George Dunlap
2013-05-30 15:39                                 ` Frediano Ziglio
2013-05-30 15:26                               ` George Dunlap
2013-05-30 15:55                                 ` Diana Crisan
2013-05-30 16:06                                   ` George Dunlap
2013-05-30 17:02                                     ` Diana Crisan
2013-05-31  8:34                                     ` Diana Crisan
2013-05-31 10:54                                       ` George Dunlap
2013-05-31 10:59                                         ` George Dunlap
2013-05-31 11:41                                           ` George Dunlap [this message]
2013-05-31 21:30                                           ` Konrad Rzeszutek Wilk
2013-05-31 22:51                                             ` Alex Bligh
2013-06-03  9:43                                             ` George Dunlap
2013-05-31 11:18                                         ` Alex Bligh
2013-05-31 11:36                                         ` Diana Crisan
2013-05-31 11:41                                           ` Diana Crisan
2013-05-31 11:49                                             ` George Dunlap
2013-05-31 11:57                                               ` Alex Bligh
2013-05-31 12:40                                                 ` Ian Campbell
2013-05-31 13:07                                                   ` George Dunlap
2013-05-31 15:10                                                     ` Roger Pau Monné
2013-06-03  8:37                                                       ` Roger Pau Monné
2013-06-03 10:05                                                         ` Stefano Stabellini
2013-06-03 10:23                                                           ` Roger Pau Monné
2013-06-03 10:30                                                             ` Stefano Stabellini
2013-06-03 11:16                                                             ` George Dunlap
2013-06-03 11:24                                                               ` Diana Crisan
2013-06-03 14:01                                                               ` Diana Crisan
2013-06-03 17:09                                                               ` Alex Bligh
2013-06-03 17:12                                                                 ` George Dunlap
2013-06-03 17:18                                                                   ` Alex Bligh
2013-06-03 17:25                                                                     ` George Dunlap
2013-06-03 17:42                                                                       ` Alex Bligh
2013-06-03 10:25                                                         ` George Dunlap
2013-05-31 13:16                                                   ` Alex Bligh
2013-05-31 14:36                                                     ` Ian Campbell
2013-05-31 15:18                                                       ` Alex Bligh
2013-05-31 12:34                                               ` Ian Campbell
2013-05-30 14:32   ` George Dunlap
2013-05-30 14:42     ` Diana Crisan
2013-06-03 17:18 Alex Bligh

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=51A88C77.9000107@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=alex@alex.org.uk \
    --cc=anthony.perard@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=dcrisan@flexiant.com \
    --cc=konrad.wilk@oracle.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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 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).