From: Christoffer Dall <cdall@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
"Christoffer Dall" <christoffer.dall@linaro.org>,
kvm@vger.kernel.org, "Marc Zyngier" <marc.zyngier@arm.com>,
"Rik van Riel" <riel@redhat.com>
Subject: Re: vtime accounting
Date: Wed, 15 Mar 2017 09:30:48 +0100 [thread overview]
Message-ID: <20170315083048.GI1277@cbox> (raw)
In-Reply-To: <91c3d503-952a-d376-b5d3-df64bc2b6332@redhat.com>
On Wed, Mar 15, 2017 at 09:05:28AM +0100, Paolo Bonzini wrote:
>
>
> On 14/03/2017 19:41, Christoffer Dall wrote:
> > So would it be worth considering factoring out vtime accounting from
> > guest_enter/exit, such that we could do the vtime accounting from vcpu
> > load/put and mark the RCU extended quiescent state in the run loop?
> >
> > Disclaimer: I haven't completely convinced myself that vtime accounting
> > from load/put works as it should.
>
> Me neither, but if it works, it's worth at least benchmarking it to make
> an informed decision.
>
I'll try to prototype it and see how it looks.
> > For example, when servicing a VM from
> > KVM, should we really be accounting this as kernel time, or as guest
> > time?
>
> Servicing the request should be fast enough that it doesn't matter. For
> the most common x86 vmexits, 50% of the time is spent executing the x86
> world switch microcode, and that is already being accounted as guest
> time already. On microbenchmarks of course it would make a difference:
>
> $ time ./x86/run x86/vmexit.flat -append cpuid -smp 4
> [...]
> real 0m1.327s
> user 0m1.877s << this is really guest time
> sys 0m1.844s << this is spent mostly in KVM_RUN
>
>
Good point, and if it's for statistics, this light change in behavior
can hardly constitute any form of user breakage.
Thanks,
-Christoffer
next prev parent reply other threads:[~2017-03-15 8:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 10:57 vtime accounting Christoffer Dall
2017-03-09 8:16 ` Paolo Bonzini
2017-03-13 17:28 ` Radim Krčmář
2017-03-14 8:26 ` Christoffer Dall
2017-03-14 8:55 ` Marc Zyngier
2017-03-14 11:12 ` Christoffer Dall
2017-03-14 11:46 ` Marc Zyngier
2017-03-14 16:58 ` Radim Krčmář
2017-03-14 17:09 ` Paolo Bonzini
2017-03-14 18:41 ` Christoffer Dall
2017-03-14 19:32 ` Radim Krčmář
2017-03-14 20:01 ` Christoffer Dall
2017-03-14 21:52 ` Radim Krčmář
2017-03-15 8:09 ` Paolo Bonzini
2017-03-15 8:05 ` Paolo Bonzini
2017-03-15 8:30 ` Christoffer Dall [this message]
2017-03-14 18:39 ` Christoffer Dall
2017-03-14 20:27 ` Radim Krčmář
2017-03-14 21:53 ` Radim Krčmář
2017-03-15 8:43 ` Christoffer Dall
2017-03-15 15:57 ` Radim Krčmář
2017-03-15 16:48 ` Christoffer Dall
2017-03-15 17:09 ` Radim Krčmář
2017-03-24 15:04 ` Rik van Riel
2017-03-27 12:29 ` Wanpeng Li
2017-03-24 14:55 ` Rik van Riel
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=20170315083048.GI1277@cbox \
--to=cdall@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=pbonzini@redhat.com \
--cc=riel@redhat.com \
--cc=rkrcmar@redhat.com \
/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