From: Peter Zijlstra <peterz@infradead.org>
To: Wanpeng Li <kernellwp@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
kvm <kvm@vger.kernel.org>, Radim Kr??m???? <rkrcmar@redhat.com>,
Wanpeng Li <wanpeng.li@hotmail.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2 2/4] KVM: Add paravirt remote TLB flush
Date: Wed, 15 Nov 2017 10:54:25 +0100 [thread overview]
Message-ID: <20171115095425.2hsgpfomdmdru7ke@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CANRm+CyoR9Nkjrz_HSkUbz0w2rzG_Rmufx48A0kw4OdxHYi3mQ@mail.gmail.com>
On Wed, Nov 15, 2017 at 04:43:32PM +0800, Wanpeng Li wrote:
> Hi Peterz,
>
> I found big performance difference as I discuss with you several days ago.
>
> ebizzy -M
> vanilla static/local cpumask per-cpu cpumask
> 8 vCPUs 10152 10083 10117
> 16 vCPUs 1224 4866 10008
> 24 vCPUs 1109 3871 9928
> 32 vCPUs 1025 3375 9811
>
> In addition, I can observe ~50% perf top time is occupied by
> smp_call_function_many(), ~30% perf top time is occupied by
> call_function_interrupt() in the guest when running ebizzy for
> static/local cpumask variable. However, I almost can't observe these
> IPI stuffs after changing to per-cpu variable. Any opinions?
That doesn't really make sense.. :/
So a single static variable is broken (multiple CPUs can call
flush_tlb_others() concurrently and overwrite each others masks). But I
don't see why a per-cpu variable would be much slower than an on-stack
variable.
next prev parent reply other threads:[~2017-11-15 9:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 7:04 [PATCH v2 0/4] KVM: Paravirt " Wanpeng Li
2017-11-10 7:04 ` [PATCH v2 1/4] KVM: Add vCPU running/preempted state Wanpeng Li
2017-11-10 7:04 ` [PATCH v2 2/4] KVM: Add paravirt remote TLB flush Wanpeng Li
2017-11-10 8:24 ` Paolo Bonzini
2017-11-10 8:33 ` Wanpeng Li
2017-11-10 8:35 ` Wanpeng Li
2017-11-15 8:43 ` Wanpeng Li
2017-11-15 9:54 ` Peter Zijlstra [this message]
2017-11-15 12:20 ` Wanpeng Li
2017-11-10 7:04 ` [PATCH v2 3/4] KVM: X86: introduce invalidate_gpa argument to tlb flush Wanpeng Li
2017-11-10 7:04 ` [PATCH v2 4/4] KVM: Add flush_on_enter before guest enter Wanpeng Li
2017-11-10 7:11 ` [PATCH v2 0/4] KVM: Paravirt remote TLB flush Wanpeng Li
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=20171115095425.2hsgpfomdmdru7ke@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=wanpeng.li@hotmail.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®