qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Masayoshi Mizuma <msys.mizuma@gmail.com>
To: Andrew Jones <drjones@redhat.com>
Cc: peter.maydell@linaro.org, bijan.mottahedeh@oracle.com,
	maz@kernel.org, richard.henderson@linaro.org,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH v1 0/5] target/arm/kvm: Provide an option to adjust virtual time
Date: Mon, 28 Oct 2019 14:39:11 -0400	[thread overview]
Message-ID: <20191028183908.7ss3o4guvfff6lxv@gabell> (raw)
In-Reply-To: <20191018120252.sdpi4t7jlectnspu@kamzik.brq.redhat.com>

On Fri, Oct 18, 2019 at 02:02:52PM +0200, Andrew Jones wrote:
> On Thu, Oct 17, 2019 at 05:17:59PM -0400, Masayoshi Mizuma wrote:
> > Hi Drew,
> > 
> > Thank you for posting the patches, they seems to work well
> > because the softlockup is gone and the timestamp jump of
> > dmesg and ftrace record also disappeared after the guest
> > is virsh resume'ed.
> > 
> > Let me add comments.
> > I think the kvm-adjvtime behavior should be the default.
> > How about introducing 'kvm-noadjvtime' parameter instead?
> > kvm-noadjvtime is to provide the old behavior.
> > 
> > That is because the time jump occurs timeout for timers even though
> > the timer doesn't reach the timeout in the guest time.
> > 
> > For example, below flow shows that user and/or kernel sets timer A
> > for +10 sec and B for +20 sec in Guest, then Guest is suspended and
> > it passes 60 sec, then Guest is resumed. Timer A and B go off because
> > the Guest timestamp (TS) is jumped to 63. That is unexpected timer
> > behavior for Guest.
> > 
> >  Host TS(sec) Guest TS(sec) Event
> >  ============ ============= =============================
> >  00           00            Guest: Set timer A for +10 sec
> >  01           01            Guest: Set timer B for +20 sec
> >  03           03            Host: virsh suspend Guest
> >  63           63            Host: virsh resume Guest
> >                             Guest: Timer A and B go off
> > 
> > I believe kvm-adjvtime behavior is as following. So Time A
> > and B go off as expected time. So, kvm-adjvtime behavior should
> > be the default.
> > 
> >  Host TS(sec) Guest TS(sec) Event
> >  ============ ============= =============================
> >  00           00            Guest: Set timer A for +10 sec
> >  01           01            Guest: Set timer B for +20 sec
> >  03           03            Host: virsh suspend guest
> >  63           03            Host: virsh resume guest
> >  70           10            Guest: Timer A goes off
> >  81           21            Guest: Timer B goes off
> > 
> 
> Thanks for the testing Masa. Your timer test is another good example of
> what can happen when a guest is paused. I'm sure there are many other ways
> a pause could be problematic as well, especially if the guest has devices
> passed through to it that it's actively using. I also don't expect
> kvm-adjvtime to solve all those problems (like, for example, potential
> problems with passthrough devices, networks, etc.)  This means that guest
> pausing should only be done by host admins that are intimately familiar
> with the guest OS, workload, and network connections. They should be sure
> that it can tolerate and recover from the pauses. Since the admins need to
> make the decision to pause at all, then I think it's fair for them to also
> decide if they want to try and mitigate some of the issues with
> kvm-adjvtime, i.e. require them to enable it, rather than have it on by
> default. 

make sense to me, thanks.

>          Also, if we choose to enable it by default, then we'll need to
> deal with the compatibility issues that come with changing a behavior.
> That's not impossible, as this feature could be disabled for older
> machine types, but it's messy.

I agree with you, we shouldn't add such messy codes to resolve
the compatibility issues...

> 
> All that said, I won't argue too hard against kvm-adjvtime being on by
> default, but let's see if others like Peter or Marc want to chime in on
> it too.

Yeah, I look forward to their comments.

Thanks,
Masa


  reply	other threads:[~2019-10-28 19:38 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 14:34 [PATCH v1 0/5] target/arm/kvm: Provide an option to adjust virtual time Andrew Jones
2019-10-16 14:34 ` [PATCH v1 1/5] target/arm/kvm64: kvm64 cpus have timer registers Andrew Jones
2019-10-16 14:34 ` [PATCH v1 2/5] timer: arm: Introduce functions to get the host cntfrq Andrew Jones
2019-12-10 15:47   ` Peter Maydell
2019-12-10 16:41     ` Andrew Jones
2019-10-16 14:34 ` [PATCH v1 3/5] target/arm/kvm: Implement cpu feature kvm-adjvtime Andrew Jones
2019-12-10 15:54   ` Peter Maydell
2019-12-10 16:10     ` Andrew Jones
2019-10-16 14:34 ` [PATCH v1 4/5] tests/arm-cpu-features: Check feature default values Andrew Jones
2019-10-16 14:34 ` [PATCH v1 5/5] target/arm/cpu: Add the kvm-adjvtime CPU property Andrew Jones
2019-10-17 21:17 ` [PATCH v1 0/5] target/arm/kvm: Provide an option to adjust virtual time Masayoshi Mizuma
2019-10-18 12:02   ` Andrew Jones
2019-10-28 18:39     ` Masayoshi Mizuma [this message]
2019-12-06 15:22 ` Peter Maydell
2019-12-06 15:53   ` Andrew Jones
2019-12-10  9:51     ` Andrea Bolognani
2019-12-10 10:29       ` Peter Maydell
2019-12-10 11:05         ` Andrew Jones
2019-12-10 11:48           ` Peter Maydell
2019-12-10 13:32             ` Andrew Jones
2019-12-10 14:21               ` Andrea Bolognani
2019-12-10 14:33                 ` Andrew Jones
2019-12-10 15:47                   ` Andrea Bolognani
2019-12-10 16:08                     ` Andrew Jones
2019-12-10 17:16                       ` Andrea Bolognani
2019-12-10 15:45               ` Peter Maydell
2019-12-11  8:02   ` Guoheyi
2019-12-11  9:00     ` Andrew Jones
2019-12-11 13:50       ` Guoheyi

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=20191028183908.7ss3o4guvfff6lxv@gabell \
    --to=msys.mizuma@gmail.com \
    --cc=bijan.mottahedeh@oracle.com \
    --cc=drjones@redhat.com \
    --cc=maz@kernel.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).