[Xen-devel] [PATCH v14 11/11] pvqspinlock, x86: Enable PV qspinlock for XEN

2015-01-20 Thread Waiman Long
This patch adds the necessary XEN specific code to allow XEN to support the CPU halting and kicking operations needed by the queue spinlock PV code. Signed-off-by: Waiman Long --- arch/x86/xen/spinlock.c | 149 +-- kernel/Kconfig.locks|2

[Xen-devel] [PATCH v14 09/11] pvqspinlock, x86: Add para-virtualization support

2015-01-20 Thread Waiman Long
its cpu number in whichever node is pointed to by the tail part of the lock word. Secondly, pv_link_and_wait_node() will propagate the existing head from the old to the new tail node. Signed-off-by: Waiman Long --- arch/x86/include/asm/paravirt.h | 22 ++ arch/x86/include/asm

[Xen-devel] [PATCH v14 05/11] qspinlock: Optimize for smaller NR_CPUS

2015-01-20 Thread Waiman Long
ded to make the qspinlock achieve performance parity with ticket spinlock at light load. All this is horribly broken on Alpha pre EV56 (and any other arch that cannot do single-copy atomic byte stores). Signed-off-by: Peter Zijlstra Signed-off-by: Waiman Long --- include/asm-gene

[Xen-devel] [PATCH v14 02/11] qspinlock, x86: Enable x86-64 to use queue spinlock

2015-01-20 Thread Waiman Long
optimization which will make the queue spinlock code perform better than the generic implementation. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra --- arch/x86/Kconfig |1 + arch/x86/include/asm/qspinlock.h | 25 + arch/x86/include/asm

[Xen-devel] [PATCH v14 04/11] qspinlock: Extract out code snippets for the next patch

2015-01-20 Thread Waiman Long
locked bit into a new clear_pending_set_locked() function. This patch also simplifies the trylock operation before queuing by calling queue_spin_trylock() directly. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra --- include/asm-generic/qspinlock_types.h |2 + kernel/locking

[Xen-devel] [PATCH v14 08/11] qspinlock, x86: Rename paravirt_ticketlocks_enabled

2015-01-20 Thread Waiman Long
This patch renames the paravirt_ticketlocks_enabled static key to a more generic paravirt_spinlocks_enabled name. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra --- arch/x86/include/asm/spinlock.h |4 ++-- arch/x86/kernel/kvm.c|2 +- arch/x86/kernel

[Xen-devel] [PATCH v14 06/11] qspinlock: Use a simple write to grab the lock

2015-01-20 Thread Waiman Long
imeUsr Time -- - ticketlock 2075 10.00 216.35 3.49 qspinlock 3023 10.00 198.20 4.80 Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra --- kernel/locking/qsp

[Xen-devel] [PATCH v14 00/11] qspinlock: a 4-byte queue spinlock with PV support

2015-01-20 Thread Waiman Long
. For the time being, unlock call site patching will not be part of this patch series. Peter Zijlstra (3): qspinlock: Add pending bit qspinlock: Optimize for smaller NR_CPUS qspinlock: Revert to test-and-set on hypervisors Waiman Long (8): qspinlock: A simple generic 4-byte queue spinloc

[Xen-devel] [PATCH v14 03/11] qspinlock: Add pending bit

2015-01-20 Thread Waiman Long
Signed-off-by: Waiman Long --- include/asm-generic/qspinlock_types.h | 12 +++- kernel/locking/qspinlock.c| 119 +++-- 2 files changed, 107 insertions(+), 24 deletions(-) diff --git a/include/asm-generic/qspinlock_types.h b/include/asm-generic/qspinlo

[Xen-devel] [PATCH v14 07/11] qspinlock: Revert to test-and-set on hypervisors

2015-01-20 Thread Waiman Long
From: Peter Zijlstra When we detect a hypervisor (!paravirt, see qspinlock paravirt support patches), revert to a simple test-and-set lock to avoid the horrors of queue preemption. Signed-off-by: Peter Zijlstra Signed-off-by: Waiman Long --- arch/x86/include/asm/qspinlock.h | 14

[Xen-devel] [PATCH v14 01/11] qspinlock: A simple generic 4-byte queue spinlock

2015-01-20 Thread Waiman Long
lock is acquired, the queue node can be released to be used later. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra --- include/asm-generic/qspinlock.h | 132 + include/asm-generic/qspinlock_types.h | 58 + kernel/Kconfig.locks

Re: [Xen-devel] [PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support

2014-11-25 Thread Waiman Long
On 10/27/2014 02:02 PM, Konrad Rzeszutek Wilk wrote: On Mon, Oct 27, 2014 at 01:38:20PM -0400, Waiman Long wrote: My concern is that spin_unlock() can be called in many places, including loadable kernel modules. Can the paravirt_patch_ident_32() function able to patch all of them in reasonable

<    1   2