kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wanpeng Li <kernellwp@gmail.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>
Subject: [PATCH v4 0/3] KVM: Introduce dedicated vCPUs hint KVM_HINTS_DEDICATED
Date: Tue, 13 Feb 2018 09:05:39 +0800	[thread overview]
Message-ID: <1518483942-14741-1-git-send-email-wanpengli@tencent.com> (raw)

This patchset introduces dedicated vCPUs(vCPU pinning, and there is no 
vCPU over-commitment) hint KVM_HINTS_DEDICATED, it has two users now:

1) Waiman Long mentioned that:

    Generally speaking, unfair lock performs well for VMs with a small
    number of vCPUs. Native qspinlock may perform better than pvqspinlock
    if there is vCPU pinning and there is no vCPU over-commitment.

2) vCPUs are very unlikely to get preempted when they are the only task 
   running on a CPU. PV TLB flush is slower that the native flush in that 
   case.

v3 -> v4:
 * update feature bit document
v2 -> v3:
 * a separate table for CPUID[0x40000001].EDX bits
 * a new kvm_hint_has_feature macro
v1 -> v2:
 * update to KVM_HINTS_DEDICATED

Wanpeng Li (3):
  KVM: Introduce dedicated vCPUs hint KVM_HINTS_DEDICATED
  KVM: X86: Choose qspinlock when dedicated vCPUs available
  KVM: X86: Don't use PV TLB flush with dedicated vCPUs and steal time disabled

 Documentation/virtual/kvm/cpuid.txt  | 15 +++++++++++++--
 arch/mips/include/asm/kvm_para.h     |  5 +++++
 arch/powerpc/include/asm/kvm_para.h  |  5 +++++
 arch/s390/include/asm/kvm_para.h     |  5 +++++
 arch/x86/include/asm/kvm_para.h      |  6 ++++++
 arch/x86/include/uapi/asm/kvm_para.h |  8 ++++++--
 arch/x86/kernel/kvm.c                | 18 ++++++++++++++++--
 include/asm-generic/kvm_para.h       |  5 +++++
 include/linux/kvm_para.h             |  5 +++++
 9 files changed, 66 insertions(+), 6 deletions(-)

-- 
2.7.4

             reply	other threads:[~2018-02-13  1:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13  1:05 Wanpeng Li [this message]
2018-02-13  1:05 ` [PATCH v4 1/3] KVM: Introduce dedicated vCPUs hint KVM_HINTS_DEDICATED Wanpeng Li
2018-02-13  1:05 ` [PATCH v4 2/3] KVM: X86: Choose qspinlock when dedicated vCPUs available Wanpeng Li
2018-02-13  1:05 ` [PATCH v4 3/3] KVM: X86: Don't use PV TLB flush with dedicated vCPUs and steal time disabled Wanpeng Li
2018-02-13 16:12   ` Paolo Bonzini
2018-02-14  3:03     ` Wanpeng Li
2018-03-06 14:39 ` [PATCH v4 0/3] KVM: Introduce dedicated vCPUs hint KVM_HINTS_DEDICATED Eduardo Valentin
2018-03-07  0:41   ` 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=1518483942-14741-1-git-send-email-wanpengli@tencent.com \
    --to=kernellwp@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@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;
as well as URLs for NNTP newsgroup(s).