From: Waiman Long <longman@redhat.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Jonathan Corbet <corbet@lwn.net>
Cc: "Rusty Russell" <rusty@rustcorp.com.au>,
kvm@vger.kernel.org, "Radim Krčmář" <rkrcmar@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
xen-devel@lists.xenproject.org,
"Alok Kataria" <akataria@vmware.com>
Subject: Re: [PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type
Date: Wed, 1 Nov 2017 15:42:22 -0400 [thread overview]
Message-ID: <575a60df-78b8-de6c-f70b-9714fde90025@redhat.com> (raw)
In-Reply-To: <5539b95d-eac4-cc09-2cfc-1452d2751fa0@oracle.com>
On 11/01/2017 03:01 PM, Boris Ostrovsky wrote:
> On 11/01/2017 12:28 PM, Waiman Long wrote:
>> On 11/01/2017 11:51 AM, Juergen Gross wrote:
>>> On 01/11/17 16:32, Waiman Long wrote:
>>>> Currently, there are 3 different lock types that can be chosen for
>>>> the x86 architecture:
>>>>
>>>> - qspinlock
>>>> - pvqspinlock
>>>> - unfair lock
>>>>
>>>> One of the above lock types will be chosen at boot time depending on
>>>> a number of different factors.
>>>>
>>>> Ideally, the hypervisors should be able to pick the best performing
>>>> lock type for the current VM configuration. That is not currently
>>>> the case as the performance of each lock type are affected by many
>>>> different factors like the number of vCPUs in the VM, the amount vCPU
>>>> overcommitment, the CPU type and so on.
>>>>
>>>> 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.
>>>>
>>>> This patch adds a new kernel parameter to allow administrator to
>>>> choose the paravirt spinlock type to be used. VM administrators can
>>>> experiment with the different lock types and choose one that can best
>>>> suit their need, if they want to. Hypervisor developers can also use
>>>> that to experiment with different lock types so that they can come
>>>> up with a better algorithm to pick the best lock type.
>>>>
>>>> The hypervisor paravirt spinlock code will override this new parameter
>>>> in determining if pvqspinlock should be used. The parameter, however,
>>>> will override Xen's xen_nopvspin in term of disabling unfair lock.
>>> Hmm, I'm not sure we need pvlock_type _and_ xen_nopvspin. What do others
>>> think?
>> I don't think we need xen_nopvspin, but I don't want to remove that
>> without agreement from the community.
> I also don't think xen_nopvspin will be needed after pvlock_type is
> introduced.
>
> -boris
Another reason that I didn't try to remove xen_nopvspin is backward
compatibility concern. One way to handle it is to depreciate it and
treat it as an alias to pvlock_type=queued.
Cheers,
Longman
next prev parent reply other threads:[~2017-11-01 19:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1509550367-19255-1-git-send-email-longman@redhat.com>
2017-11-01 15:51 ` [PATCH] x86/paravirt: Add kernel parameter to choose paravirt lock type Juergen Gross
[not found] ` <404a9fab-03ff-174e-4ece-79932a6f302c@suse.com>
2017-11-01 16:28 ` Waiman Long
[not found] ` <409ede92-5243-0d9b-7893-b596f3f353aa@redhat.com>
2017-11-01 19:01 ` Boris Ostrovsky
2017-11-01 19:42 ` Waiman Long [this message]
2017-11-01 15:32 Waiman Long
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=575a60df-78b8-de6c-f70b-9714fde90025@redhat.com \
--to=longman@redhat.com \
--cc=akataria@vmware.com \
--cc=boris.ostrovsky@oracle.com \
--cc=corbet@lwn.net \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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).