From: Peter Zijlstra <peterz@infradead.org>
To: Waiman Long <longman@redhat.com>
Cc: Juergen Gross <jgross@suse.com>,
linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
x86@kernel.org, virtualization@lists.linux-foundation.org,
jeremy@goop.org, chrisw@sous-sol.org, akataria@vmware.com,
rusty@rustcorp.com.au, boris.ostrovsky@oracle.com, hpa@zytor.com,
tglx@linutronix.de, mingo@redhat.com
Subject: Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function
Date: Tue, 5 Sep 2017 16:08:13 +0200 [thread overview]
Message-ID: <20170905140813.e455trgmcq3ahzry@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <3eee978b-e570-5675-7840-c448375b02fc@redhat.com>
On Tue, Sep 05, 2017 at 10:02:57AM -0400, Waiman Long wrote:
> On 09/05/2017 09:24 AM, Juergen Gross wrote:
> > +static inline bool native_virt_spin_lock(struct qspinlock *lock)
> > +{
> > + if (!static_cpu_has(X86_FEATURE_HYPERVISOR))
> > + return false;
> > +
>
> I think you can take the above if statement out as you has done test in
> native_pv_lock_init(). So the test will also be false here.
That does mean we'll run a test-and-set spinlock until paravirt patching
happens though. I prefer to not do that.
One important point.. we must not be holding any locks when we switch
over between the two locks. Back then I spend some time making sure that
didn't happen with the X86 feature flag muck.
next prev parent reply other threads:[~2017-09-05 14:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-05 13:24 [PATCH 0/4] make virt_spin_lock() a " Juergen Gross
2017-09-05 13:24 ` [PATCH 1/4] paravirt: add generic _paravirt_false() function Juergen Gross
2017-09-05 13:24 ` [PATCH 2/4] paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare metal Juergen Gross
2017-09-05 13:24 ` [PATCH 3/4] paravirt: add virt_spin_lock pvops function Juergen Gross
2017-09-05 13:55 ` Peter Zijlstra
2017-09-05 14:01 ` Juergen Gross
2017-09-05 14:02 ` Waiman Long
2017-09-05 14:08 ` Peter Zijlstra [this message]
2017-09-05 14:19 ` Waiman Long
2017-09-05 14:10 ` Waiman Long
2017-09-05 14:18 ` Juergen Gross
2017-09-05 14:24 ` Waiman Long
2017-09-05 14:31 ` Waiman Long
2017-09-05 14:42 ` Juergen Gross
2017-09-06 7:08 ` Peter Zijlstra
2017-09-06 12:44 ` Waiman Long
2017-09-06 13:06 ` Peter Zijlstra
2017-09-06 13:11 ` Waiman Long
2017-09-05 13:24 ` [PATCH 4/4] paravirt,xen: correct xen_nopvspin case Juergen Gross
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=20170905140813.e455trgmcq3ahzry@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=akataria@vmware.com \
--cc=boris.ostrovsky@oracle.com \
--cc=chrisw@sous-sol.org \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@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
all inboxes | Powered by JetHome®