virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Waiman Long <longman@redhat.com>, Peter Zijlstra <peterz@infradead.org>
Cc: jeremy@goop.org, x86@kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, chrisw@sous-sol.org,
	mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com,
	xen-devel@lists.xenproject.org, akataria@vmware.com,
	boris.ostrovsky@oracle.com
Subject: Re: [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()
Date: Wed, 6 Sep 2017 19:33:10 +0200	[thread overview]
Message-ID: <6db11611-3b41-47fe-ec4c-75b1decbc83c@suse.com> (raw)
In-Reply-To: <73d39808-ad47-6d06-89be-034181099408@redhat.com>

On 06/09/17 18:13, Waiman Long wrote:
> On 09/06/2017 12:04 PM, Peter Zijlstra wrote:
>> On Wed, Sep 06, 2017 at 11:49:49AM -0400, Waiman Long wrote:
>>>>  #define virt_spin_lock virt_spin_lock
>>>>  static inline bool virt_spin_lock(struct qspinlock *lock)
>>>>  {
>>>> +	if (!static_branch_likely(&virt_spin_lock_key))
>>>> +		return false;
>>>>  	if (!static_cpu_has(X86_FEATURE_HYPERVISOR))
>>>>  		return false;
>>>>  
>> Now native has two NOPs instead of one. Can't we merge these two static
>> branches?
> 
> 
> I guess we can remove the static_cpu_has() call. Just that any spin_lock
> calls before native_pv_lock_init() will use the virt_spin_lock(). That
> is still OK as the init call is done before SMP starts.

Hmm, right. I'll send V3 in some minutes.


Juergen

  parent reply	other threads:[~2017-09-06 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170906152928.8658-1-jgross@suse.com>
2017-09-06 15:29 ` [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock() Juergen Gross
2017-09-06 15:29 ` [PATCH v2 2/2] paravirt,xen: correct xen_nopvspin case Juergen Gross
     [not found] ` <20170906152928.8658-2-jgross@suse.com>
2017-09-06 15:49   ` [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock() Waiman Long
     [not found]   ` <a0cf01cf-922a-dbc7-949e-0f87bcdd1ad9@redhat.com>
2017-09-06 16:04     ` Peter Zijlstra
2017-09-06 16:13       ` Waiman Long
     [not found]       ` <73d39808-ad47-6d06-89be-034181099408@redhat.com>
2017-09-06 17:33         ` Juergen Gross [this message]
     [not found] ` <20170906152928.8658-3-jgross@suse.com>
2017-09-06 15:50   ` [PATCH v2 2/2] paravirt,xen: correct xen_nopvspin case 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=6db11611-3b41-47fe-ec4c-75b1decbc83c@suse.com \
    --to=jgross@suse.com \
    --cc=akataria@vmware.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=chrisw@sous-sol.org \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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).