qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Milan Zamazal <mzamazal@redhat.com>
To: Veselina Radeva <vessy@st6.io>
Cc: qemu-devel@nongnu.org
Subject: Re: Question about migration of a VM between hosts having slight difference in TSC Frequency
Date: Fri, 18 Dec 2020 12:25:56 +0100	[thread overview]
Message-ID: <878s9v5pa3.fsf@redhat.com> (raw)
In-Reply-To: <CAHNOXOQREiONA5aurW4B0aW4MJjmamqp6ZXpauCY4O88A1sSAw@mail.gmail.com> (Veselina Radeva's message of "Thu, 17 Dec 2020 13:54:22 +0200")

Veselina Radeva <vessy@st6.io> writes:

> Hi,
>
> I'm trying to migrate a VM from one host to another where there is a 1KHz
> difference in the TSC frequency between hosts. This results in errors
> caused by this warning
> <https://github.com/qemu/qemu/blob/b785d25e91718a660546a6550f64b3c543af7754/target/i386/kvm.c#L777>,
> so migration fails. On the other hand, I can see few lines before that
> <https://github.com/qemu/qemu/blob/b785d25e91718a660546a6550f64b3c543af7754/target/i386/kvm.c#L761>
> that
> there is a try to allow TSC frequency difference between host and VM if it
> falls within the specified bounds. It seems like `KVM_SET_TSC_KHZ`succeeds
> only when TSC Scaling is available
> <https://github.com/qemu/qemu/blob/2c6605389c1f76973d92b69b85d40d94b8f1092c/linux-headers/linux/kvm.h#L1361>.
> Practically this means that migration between hosts having difference in
> TSC frequency, even when it falls within bounds, is possible only when TSC
> scaling is available.

Hi,

it should be possible to migrate within the 250 ppm frequency difference
tolerance even when TSC scaling is not available.  But sufficiently new
QEMU and kernel are needed, I think QEMU >= 5.1 and Linux >= 5.8.

> On the other hand, in libvirt,
> <https://github.com/libvirt/libvirt/commit/d8e5b4560006590668d4669f54a46b08ec14c1a2>
> migration is allowed if TSC frequency difference falls within bounds, no
> matter if TSC scaling is enabled or not.
>
> So, I was wondering is it intended not to allow migration between hosts
> having differences in TSC frequency if TSC scaling is not available? Or is
> it a bug?

If you have the right kernel, QEMU and libvirt (if you use it) versions
and it doesn't work then it looks like a bug to me.

Regards,
Milan

> Thanks in advance,
> Veselina Radeva
> https://st6.io/



      reply	other threads:[~2020-12-18 11:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 11:54 Question about migration of a VM between hosts having slight difference in TSC Frequency Veselina Radeva
2020-12-18 11:25 ` Milan Zamazal [this message]

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=878s9v5pa3.fsf@redhat.com \
    --to=mzamazal@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vessy@st6.io \
    /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).