public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] KVM: MMU: Separate trivial NULL check out from rmap_get_next()
Date: Thu, 15 Mar 2012 14:01:11 +0200	[thread overview]
Message-ID: <4F61DA07.4010200@redhat.com> (raw)
In-Reply-To: <20120315191553.32d6fc36.yoshikawa.takuya@oss.ntt.co.jp>

On 03/15/2012 12:15 PM, Takuya Yoshikawa wrote:
> Avi Kivity <avi@redhat.com> wrote:
>
> > > Although using "inline" like this does not look clean, we could see
> > > measurable performance improvements: get_dirty_log for 1GB dirty memory
> > > became faster by more than 10% on my test box.
> > >
> > 
> > WOW.  I'd have assumed the processor deals better with this; it should
> > be 100% predicted branches.
> > 
> > But I won't argue with cold data.
>
> What I checked was:
>
> original   with-patch2   with-patch3
> 8.7ms      8.5ms         7.5ms

What's the per-call numbers?

> I assumed that without "inline" only __rmap_get_next() would be inlined
> into rmap_get_next() so did like this.
>
> I thought the improvement was just from removing one function call for
> each rmap_write_protect.  Not sure if anything was changed with branch
> predictions.

What I mean is, modern cpus effectively inline simple function calls by
predicting the call, and branchs within the function, and the return, so
they don't have to stop their pipelines at any of these points.  But
again, the numbers talk louder than speculation about cpu architecture.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2012-03-15 12:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15  9:18 [PATCH 0/3] KVM: MMU: Improve rmap handling Takuya Yoshikawa
2012-03-15  9:19 ` [PATCH 1/3] KVM: MMU: Make pte_list_desc fit cache lines well Takuya Yoshikawa
2012-03-15  9:22   ` Avi Kivity
2012-03-15  9:20 ` [PATCH 2/3] KVM: MMU: Improve iteration over sptes linked by rmap Takuya Yoshikawa
2012-03-15  9:44   ` Avi Kivity
2012-03-15 10:25     ` Takuya Yoshikawa
2012-03-15  9:21 ` [PATCH 3/3] KVM: MMU: Separate trivial NULL check out from rmap_get_next() Takuya Yoshikawa
2012-03-15  9:49   ` Avi Kivity
2012-03-15 10:15     ` Takuya Yoshikawa
2012-03-15 12:01       ` Avi Kivity [this message]
2012-03-15 13:41         ` Takuya Yoshikawa
2012-03-15 13:45           ` Avi Kivity
2012-03-15 13:46           ` Avi Kivity
2012-03-20  6:37             ` Takuya Yoshikawa
2012-03-20 11:56               ` Avi Kivity

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=4F61DA07.4010200@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=yoshikawa.takuya@oss.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