mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Eric Farman <farman@linux.vnet.ibm.com>
Cc: "Longpeng (Mike)" <longpeng2@huawei.com>,
	pbonzini@redhat.com, rkrcmar@redhat.com, agraf@suse.com,
	borntraeger@de.ibm.com, christoffer.dall@linaro.org,
	marc.zyngier@arm.com, james.hogan@imgtec.com,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	weidong.huang@huawei.com, arei.gonglei@huawei.com,
	wangxinxin.wang@huawei.com, longpeng.mike@gmail.com,
	david@redhat.com
Subject: Re: [PATCH v2 0/4] KVM: optimize the kvm_vcpu_on_spin
Date: Fri, 11 Aug 2017 09:19:53 +0200	[thread overview]
Message-ID: <20170811091953.75a8376e.cohuck@redhat.com> (raw)
In-Reply-To: <65ce708e-480a-6173-f678-d7934c630439@linux.vnet.ibm.com>

On Thu, 10 Aug 2017 09:18:09 -0400
Eric Farman <farman@linux.vnet.ibm.com> wrote:

> On 08/08/2017 04:14 AM, Longpeng (Mike) wrote:
> > 
> > 
> > On 2017/8/8 15:41, Cornelia Huck wrote:
> >   
> >> On Tue, 8 Aug 2017 12:05:31 +0800
> >> "Longpeng(Mike)" <longpeng2@huawei.com> wrote:
> >>  
> >>> This is a simple optimization for kvm_vcpu_on_spin, the
> >>> main idea is described in patch-1's commit msg.  
> >>
> >> I think this generally looks good now.
> >>  
> >>>
> >>> I did some tests base on the RFC version, the result shows
> >>> that it can improves the performance slightly.  
> >>
> >> Did you re-run tests on this version?  
> > 
> > 
> > Hi Cornelia,
> > 
> > I didn't re-run tests on V2. But the major difference between RFC and V2
> > is that V2 only cache result for X86 (s390/arm needn't) and V2 saves a
> > expensive operation ( 440-1400 cycles on my test machine ) for X86/VMX.
> > 
> > So I think V2's performance is at least the same as RFC or even slightly
> > better. :)
> >   
> >>
> >> I would also like to see some s390 numbers; unfortunately I only have a
> >> z/VM environment and any performance numbers would be nearly useless
> >> there. Maybe somebody within IBM with a better setup can run a quick
> >> test?  
> 
> Won't swear I didn't screw something up, but here's some quick numbers. 
> Host was 4.12.0 with and without this series, running QEMU 2.10.0-rc0. 
> Created 4 guests, each with 4 CPU (unpinned) and 4GB RAM.  VM1 did full 
> kernel compiles with kernbench, which took averages of 5 runs of 
> different job sizes (I threw away the "-j 1" numbers). VM2-VM4 ran cpu 
> burners on 2 of their 4 cpus.
> 
> Numbers from VM1 kernbench output, and the delta between runs:
> 
> load -j 3		before		after		delta
> Elapsed Time		183.178		182.58		-0.598
> User Time		534.19		531.52		-2.67
> System Time		32.538		33.37		0.832
> Percent CPU		308.8		309		0.2
> Context Switches	98484.6		99001		516.4
> Sleeps			227347		228752		1405
> 
> load -j 16		before		after		delta
> Elapsed Time		153.352		147.59		-5.762
> User Time		545.829		533.41		-12.419
> System Time		34.289		34.85		0.561
> Percent CPU		347.6		348		0.4
> Context Switches	160518		159120		-1398
> Sleeps			240740		240536		-204

Thanks a lot, Eric!

The decreases in elapsed time look nice, and we probably should not
care about the increases reported.

  parent reply	other threads:[~2017-08-11  7:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08  4:05 Longpeng(Mike)
2017-08-08  4:05 ` [PATCH v2 1/4] KVM: add spinlock optimization framework Longpeng(Mike)
2017-08-08  7:34   ` Paolo Bonzini
2017-08-08  7:43     ` Cornelia Huck
2017-08-08  8:42   ` David Hildenbrand
2017-08-08  8:44     ` David Hildenbrand
2017-08-08  9:00     ` Paolo Bonzini
2017-08-08  9:35       ` Longpeng (Mike)
2017-08-08  4:05 ` [PATCH v2 2/4] KVM: X86: implement the logic for spinlock optimization Longpeng(Mike)
2017-08-08  7:30   ` Paolo Bonzini
2017-08-08  8:31     ` Longpeng (Mike)
2017-08-08  8:39       ` Paolo Bonzini
2017-08-08  4:05 ` [PATCH v2 3/4] KVM: s390: implements the kvm_arch_vcpu_in_kernel() Longpeng(Mike)
2017-08-08  7:37   ` Cornelia Huck
2017-08-08  8:35   ` David Hildenbrand
2017-08-08  4:05 ` [PATCH v2 4/4] KVM: arm: " Longpeng(Mike)
2017-08-08  7:39   ` Christoffer Dall
2017-08-08  7:41     ` Christoffer Dall
2017-08-08  7:41 ` [PATCH v2 0/4] KVM: optimize the kvm_vcpu_on_spin Cornelia Huck
2017-08-08  8:14   ` Longpeng (Mike)
2017-08-10 13:18     ` Eric Farman
2017-08-11  1:43       ` Longpeng (Mike)
2017-08-11  7:19       ` Cornelia Huck [this message]
2017-08-08 11:25 ` David Hildenbrand
2017-08-08 11:30   ` Christoffer Dall
2017-08-08 11:49   ` Longpeng (Mike)
2017-08-08 11:50     ` David Hildenbrand

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=20170811091953.75a8376e.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=agraf@suse.com \
    --cc=arei.gonglei@huawei.com \
    --cc=borntraeger@de.ibm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=david@redhat.com \
    --cc=farman@linux.vnet.ibm.com \
    --cc=james.hogan@imgtec.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longpeng.mike@gmail.com \
    --cc=longpeng2@huawei.com \
    --cc=marc.zyngier@arm.com \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=wangxinxin.wang@huawei.com \
    --cc=weidong.huang@huawei.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

all inboxes | Powered by JetHome®