From: Gleb Natapov <gleb@redhat.com>
To: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
Cc: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>,
mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Don't use vcpu->requests for steal time accounting
Date: Fri, 14 Dec 2012 17:41:10 +0200 [thread overview]
Message-ID: <20121214154110.GR29003@redhat.com> (raw)
In-Reply-To: <20121215001208.de27019a1768bbe6b406b6dd@gmail.com>
On Sat, Dec 15, 2012 at 12:12:08AM +0900, Takuya Yoshikawa wrote:
> On Fri, 14 Dec 2012 13:28:15 +0200
> Gleb Natapov <gleb@redhat.com> wrote:
>
> > On Fri, Dec 14, 2012 at 07:37:18PM +0900, Takuya Yoshikawa wrote:
> > > We can check if accum_steal has any positive value instead of using
> > > KVM_REQ_STEAL_UPDATE bit in vcpu->requests; and this is the way we
> > > usually do for accounting for something in the kernel.
> > >
> > Now you added check that will be done on each guest entry, requests
> > mechanism prevents that.
>
> Yes, +1 "if" for the case we have nothing in requests.
>
Almost any bit in requests can be replaced by one "if". Those
if's add up.
> I'm not sure if setting and clearing a bit for that minor
> optimization is worth it.
>
Setting/clearing it should be much more rare than guest entry.
--
Gleb.
prev parent reply other threads:[~2012-12-14 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 10:37 [PATCH] KVM: Don't use vcpu->requests for steal time accounting Takuya Yoshikawa
2012-12-14 11:28 ` Gleb Natapov
2012-12-14 15:12 ` Takuya Yoshikawa
2012-12-14 15:41 ` Gleb Natapov [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=20121214154110.GR29003@redhat.com \
--to=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=takuya.yoshikawa@gmail.com \
--cc=yoshikawa_takuya_b1@lab.ntt.co.jp \
/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