On 04/30/2015 03:53 AM, Juergen Gross wrote:
Paravirtualized spinlocks produce some overhead even if the kernel is
running on bare metal. The main reason are the more complex locking
and unlocking functions. Especially unlocking is no longer just one
instruction but so complex that it is no
On 04/29/2015 02:27 PM, Linus Torvalds wrote:
On Wed, Apr 29, 2015 at 11:11 AM, Peter Zijlstrapet...@infradead.org wrote:
On Fri, Apr 24, 2015 at 02:56:42PM -0400, Waiman Long wrote:
In the pv_scan_next() function, the slow cmpxchg atomic operation is
performed even if the other CPU is not
On 04/29/2015 02:11 PM, Peter Zijlstra wrote:
On Fri, Apr 24, 2015 at 02:56:42PM -0400, Waiman Long wrote:
In the pv_scan_next() function, the slow cmpxchg atomic operation is
performed even if the other CPU is not even close to being halted. This
extra cmpxchg can harm slowpath performance.
The decision whether the slowpath flag is to be cleared for
paravirtualized spinlocks is located in
__ticket_check_and_clear_slowpath() today.
Move that decision into arch_spin_lock() and add an unlikely attribute
to it to avoid calling a function in case the compiler chooses not to
inline
For paravirtualized spinlocks setting the slowpath flag in
__ticket_enter_slowpath() is done via setting bit 0 in
lock-tickets.head instead of using a macro.
Change this by defining an appropriate macro.
Signed-off-by: Juergen Gross jgr...@suse.com
---
arch/x86/include/asm/spinlock.h | 3
To speed up paravirtualized spinlock handling when running on bare
metal introduce a new pvops function clear_slowpath. This is a nop
when the kernel is running on bare metal.
As the clear_slowpath function is common for all users add a new
initialization function to set the pvops function
There is no need any more for a special treatment of _raw_spin_unlock()
regarding inlining compared to the other spinlock functions. Just treat
it like all the other spinlock functions.
Remove selecting UNINLINE_SPIN_UNLOCK in case of PARAVIRT_SPINLOCKS.
Signed-off-by: Juergen Gross
To speed up paravirtualized spinlock handling when running on bare
metal introduce a new pvops function spin_unlock. This is a simple
add instruction (possibly with lock prefix) when the kernel is running
on bare metal.
As the patched instruction includes a lock prefix in some
configurations
Paravirtualized spinlocks produce some overhead even if the kernel is
running on bare metal. The main reason are the more complex locking
and unlocking functions. Especially unlocking is no longer just one
instruction but so complex that it is no longer inlined.
This patch series addresses this
With the paravirtualized spinlock unlock function being a pvops
function paravirt_ticketlocks_enabled is no longer needed. Remove it.
Signed-off-by: Juergen Gross jgr...@suse.com
---
arch/x86/include/asm/spinlock.h | 3 ---
arch/x86/kernel/kvm.c| 14 --
10 matches
Mail list logo