Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1726775
| From | Waiman Long <longman@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function |
| Date | 2017-09-05 16:20 +0200 |
| Message-ID | <ummRQ-3Lb-19@gated-at.bofh.it> (permalink) |
| References | <umm5s-38R-9@gated-at.bofh.it> <umm5t-38R-29@gated-at.bofh.it> <ummI9-3Fq-3@gated-at.bofh.it> <ummIa-3Fq-13@gated-at.bofh.it> |
| Organization | Red Hat |
On 09/05/2017 10:08 AM, Peter Zijlstra wrote:
> 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.
AFAICT, native_pv_lock_init() is called before SMP init. So it shouldn't
matter.
Cheers,
Longman
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] make virt_spin_lock() a pvops function Juergen Gross <jgross@suse.com> - 2017-09-05 15:30 +0200
[PATCH 3/4] paravirt: add virt_spin_lock pvops function Juergen Gross <jgross@suse.com> - 2017-09-05 15:30 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Peter Zijlstra <peterz@infradead.org> - 2017-09-05 16:00 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Juergen Gross <jgross@suse.com> - 2017-09-05 16:10 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Waiman Long <longman@redhat.com> - 2017-09-05 16:10 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Peter Zijlstra <peterz@infradead.org> - 2017-09-05 16:10 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Waiman Long <longman@redhat.com> - 2017-09-05 16:20 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Waiman Long <longman@redhat.com> - 2017-09-05 16:20 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Juergen Gross <jgross@suse.com> - 2017-09-05 16:20 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Waiman Long <longman@redhat.com> - 2017-09-05 16:30 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Waiman Long <longman@redhat.com> - 2017-09-05 16:40 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Juergen Gross <jgross@suse.com> - 2017-09-05 16:50 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Peter Zijlstra <peterz@infradead.org> - 2017-09-06 09:10 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Waiman Long <longman@redhat.com> - 2017-09-06 14:50 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Peter Zijlstra <peterz@infradead.org> - 2017-09-06 15:10 +0200
Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function Waiman Long <longman@redhat.com> - 2017-09-06 15:20 +0200
csiph-web