Thread (2 messages) flat view 2 messages, 2 authors, 2017-09-06

Re: [PATCH v2 1/2] paravirt/locks: use new static key for controlling call of virt_spin_lock()

From: Peter Zijlstra <peterz@infradead.org>
Date: 2017-09-06 16:04:33
Also in: lkml

On Wed, Sep 06, 2017 at 11:49:49AM -0400, Waiman Long wrote:
quoted
 #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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help