Re: kvm linux guest hanging for minutes at a time

Thomas Fjellstrom
2011-08-11T16:37:34Z

On August 11, 2011, Avi Kivity wrote:
> On 08/09/2011 06:33 PM, Nick wrote:
> > Hi,
> >
> > Just joined this list, looking for leads to solve a similar-sounding
> > problem (guest processes hanging for seconds or minutes when host IO
> > load is high). I'll say more in a separate email, but I caught the end
> > of this thread and wanted to ask about kvm-clock.
> >
> > Naively I'd have thought that using the wrong clock would not actually
> > *cause* hangs like this. Or is that what you're implying?
>
> Using the wrong clock easily causes hangs. The system schedules a
> wakeup in 3 ms, wrong clock causes it to wakeup in 3 years, you get a
> hang for (3 years - 3 ms).

I am wondering though why the system time would be used to schedule wakeups
when something a little more like the posix CLOCK_MONOTONIC would make more
sense. You (at least I don't think you do) really don't want host clock
changes to interfere with a guest so much that it sleeps forever.