[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v6 05/11] pvqspinlock, x86: Allow unfair spinlock in a PV guest
- To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Waiman Long <waiman.long@xxxxxx>
- From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
- Date: Fri, 14 Mar 2014 09:48:09 +0100
- Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>, Gleb Natapov <gleb@xxxxxxxxxx>, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, Andi Kleen <andi@xxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Michel Lespinasse <walken@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, linux-arch@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Alok Kataria <akataria@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Scott J Norton <scott.norton@xxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Aswin Chandramouleeswaran <aswin@xxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>
- Delivery-date: Fri, 14 Mar 2014 08:48:34 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
Il 14/03/2014 09:30, Peter Zijlstra ha scritto:
Take the situation of 3 (v)CPUs where cpu0 holds the lock but is
preempted. cpu1 queues, cpu2 queues. Then cpu1 gets preempted, after
which cpu0 gets back online.
The simple test-and-set lock will now let cpu2 acquire. Your queue
however will just sit there spinning, waiting for cpu1 to come back from
holiday.
I think you're way over engineering this. Just do the simple
test-and-set lock for virt && !paravirt (as I think Paolo Bonzini
suggested RHEL6 already does).
Exactly.
Paolo
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|