* [PATCH] x86/pvqspinlock: Use LOCK_PREFIX in __pv_queued_spin_unlock assembly code
@ 2018-07-17 20:16 Waiman Long
2018-07-18 8:19 ` Peter Zijlstra
2018-07-25 14:20 ` [tip:locking/urgent] locking/pvqspinlock/x86: Use LOCK_PREFIX in __pv_queued_spin_unlock() " tip-bot for Waiman Long
0 siblings, 2 replies; 4+ messages in thread
From: Waiman Long @ 2018-07-17 20:16 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar
Cc: linux-kernel, x86, Will Deacon, Joe Mario, Waiman Long
The LOCK_PREFIX macro should be used in the assembly
__raw_callee_save___pv_queued_spin_unlock code so that the lock prefix
can be patched out on UP systems.
Signed-off-by: Waiman Long <longman@redhat.com>
---
arch/x86/include/asm/qspinlock_paravirt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/include/asm/qspinlock_paravirt.h
index 9ef5ee0..159622e 100644
--- a/arch/x86/include/asm/qspinlock_paravirt.h
+++ b/arch/x86/include/asm/qspinlock_paravirt.h
@@ -43,7 +43,7 @@
"push %rdx;"
"mov $0x1,%eax;"
"xor %edx,%edx;"
- "lock cmpxchg %dl,(%rdi);"
+ LOCK_PREFIX "cmpxchg %dl,(%rdi);"
"cmp $0x1,%al;"
"jne .slowpath;"
"pop %rdx;"
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/pvqspinlock: Use LOCK_PREFIX in __pv_queued_spin_unlock assembly code
2018-07-17 20:16 [PATCH] x86/pvqspinlock: Use LOCK_PREFIX in __pv_queued_spin_unlock assembly code Waiman Long
@ 2018-07-18 8:19 ` Peter Zijlstra
2018-07-18 13:28 ` Waiman Long
2018-07-25 14:20 ` [tip:locking/urgent] locking/pvqspinlock/x86: Use LOCK_PREFIX in __pv_queued_spin_unlock() " tip-bot for Waiman Long
1 sibling, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2018-07-18 8:19 UTC (permalink / raw)
To: Waiman Long; +Cc: Ingo Molnar, linux-kernel, x86, Will Deacon, Joe Mario
On Tue, Jul 17, 2018 at 04:16:00PM -0400, Waiman Long wrote:
> The LOCK_PREFIX macro should be used in the assembly
> __raw_callee_save___pv_queued_spin_unlock code so that the lock prefix
> can be patched out on UP systems.
True; but does paravirt locking realy make sense on UP guests?
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
> arch/x86/include/asm/qspinlock_paravirt.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/include/asm/qspinlock_paravirt.h
> index 9ef5ee0..159622e 100644
> --- a/arch/x86/include/asm/qspinlock_paravirt.h
> +++ b/arch/x86/include/asm/qspinlock_paravirt.h
> @@ -43,7 +43,7 @@
> "push %rdx;"
> "mov $0x1,%eax;"
> "xor %edx,%edx;"
> - "lock cmpxchg %dl,(%rdi);"
> + LOCK_PREFIX "cmpxchg %dl,(%rdi);"
> "cmp $0x1,%al;"
> "jne .slowpath;"
> "pop %rdx;"
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/pvqspinlock: Use LOCK_PREFIX in __pv_queued_spin_unlock assembly code
2018-07-18 8:19 ` Peter Zijlstra
@ 2018-07-18 13:28 ` Waiman Long
0 siblings, 0 replies; 4+ messages in thread
From: Waiman Long @ 2018-07-18 13:28 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, linux-kernel, x86, Will Deacon, Joe Mario
On 07/18/2018 04:19 AM, Peter Zijlstra wrote:
> On Tue, Jul 17, 2018 at 04:16:00PM -0400, Waiman Long wrote:
>> The LOCK_PREFIX macro should be used in the assembly
>> __raw_callee_save___pv_queued_spin_unlock code so that the lock prefix
>> can be patched out on UP systems.
> True; but does paravirt locking realy make sense on UP guests?
>
Yes, it doesn't make sense. That is why I have another kvm patch that
turns off pvqspinlock for UP guest. However, I am not that familiar with
the Xen code. So I don't have a corresponding one for Xen.
Cheers,
Longman
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:locking/urgent] locking/pvqspinlock/x86: Use LOCK_PREFIX in __pv_queued_spin_unlock() assembly code
2018-07-17 20:16 [PATCH] x86/pvqspinlock: Use LOCK_PREFIX in __pv_queued_spin_unlock assembly code Waiman Long
2018-07-18 8:19 ` Peter Zijlstra
@ 2018-07-25 14:20 ` tip-bot for Waiman Long
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Waiman Long @ 2018-07-25 14:20 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, jmario, peterz, torvalds, longman, tglx, will.deacon,
linux-kernel, hpa
Commit-ID: c0dc373a780f4ec63e45a573b9551763abd8cd1a
Gitweb: https://git.kernel.org/tip/c0dc373a780f4ec63e45a573b9551763abd8cd1a
Author: Waiman Long <longman@redhat.com>
AuthorDate: Tue, 17 Jul 2018 16:16:00 -0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 25 Jul 2018 11:22:20 +0200
locking/pvqspinlock/x86: Use LOCK_PREFIX in __pv_queued_spin_unlock() assembly code
The LOCK_PREFIX macro should be used in the __raw_callee_save___pv_queued_spin_unlock()
assembly code, so that the lock prefix can be patched out on UP systems.
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Joe Mario <jmario@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/r/1531858560-21547-1-git-send-email-longman@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/qspinlock_paravirt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/qspinlock_paravirt.h b/arch/x86/include/asm/qspinlock_paravirt.h
index 9ef5ee03d2d7..159622ee0674 100644
--- a/arch/x86/include/asm/qspinlock_paravirt.h
+++ b/arch/x86/include/asm/qspinlock_paravirt.h
@@ -43,7 +43,7 @@ asm (".pushsection .text;"
"push %rdx;"
"mov $0x1,%eax;"
"xor %edx,%edx;"
- "lock cmpxchg %dl,(%rdi);"
+ LOCK_PREFIX "cmpxchg %dl,(%rdi);"
"cmp $0x1,%al;"
"jne .slowpath;"
"pop %rdx;"
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-25 14:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 20:16 [PATCH] x86/pvqspinlock: Use LOCK_PREFIX in __pv_queued_spin_unlock assembly code Waiman Long
2018-07-18 8:19 ` Peter Zijlstra
2018-07-18 13:28 ` Waiman Long
2018-07-25 14:20 ` [tip:locking/urgent] locking/pvqspinlock/x86: Use LOCK_PREFIX in __pv_queued_spin_unlock() " tip-bot for Waiman Long
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).