From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: paulmck@linux.vnet.ibm.com,
linux-kernel <linux-kernel@vger.kernel.org>,
kvm@vger.kernel.org, gleb@redhat.com
Subject: Re: [PATCH RFC] kvm: optimize out smp_mb using srcu_read_unlock
Date: Thu, 31 Oct 2013 13:32:59 +0200 [thread overview]
Message-ID: <20131031113259.GA8976@redhat.com> (raw)
In-Reply-To: <52723B87.1050609@redhat.com>
On Thu, Oct 31, 2013 at 12:14:15PM +0100, Paolo Bonzini wrote:
> Il 30/10/2013 20:09, Michael S. Tsirkin ha scritto:
> > I noticed that srcu_read_lock/unlock both have a memory barrier,
> > so just by moving srcu_read_unlock earlier we can get rid of
> > one call to smp_mb().
> >
> > Unsurprisingly, the gain is small but measureable using the unit test
> > microbenchmark:
> > before
> > vmcall 1407
> > after
> > vmcall 1357
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>
> Across how many runs?
It's the experiment that vmexit test does:
it runs for 2^30 cycles, then divides the number of cycles by the
number of iterations.
You get in the ballpark of 1300000 iterations normally.
> Best or average or "all runs were in that
> ballpark", :) and what's the minimum/maximum before and after the patch?
>
> As you say the benefit is not surprising, but the experiments should be
> documented properly.
>
> Paolo
"All runs in that ballpark".
--
MST
prev parent reply other threads:[~2013-10-31 11:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 19:09 [PATCH RFC] kvm: optimize out smp_mb using srcu_read_unlock Michael S. Tsirkin
2013-10-30 20:15 ` Paul E. McKenney
2013-10-30 23:26 ` Michael S. Tsirkin
2013-10-31 4:56 ` Paul E. McKenney
2013-10-31 6:47 ` Gleb Natapov
2013-10-31 11:11 ` Paolo Bonzini
2013-10-31 12:28 ` Gleb Natapov
2013-10-31 13:57 ` Michael S. Tsirkin
2013-11-01 8:43 ` Paul E. McKenney
2013-10-31 11:14 ` Paolo Bonzini
2013-10-31 11:32 ` Michael S. Tsirkin [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=20131031113259.GA8976@redhat.com \
--to=mst@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pbonzini@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