login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
November
»
2
Re: [patch 1/4] x86: FIFO ticket spinlocks
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Chuck Ebbert <cebbert@...>
To: Nick Piggin <npiggin@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, Linus Torvalds <torvalds@...>, Andi Kleen <ak@...>, Ingo Molnar <mingo@...>
Subject:
Re: [patch 1/4] x86: FIFO ticket spinlocks
Date: Friday, November 2, 2007 - 12:22 pm
On 11/01/2007 10:03 AM, Nick Piggin wrote:
quoted text
> Introduce ticket lock spinlocks for x86 which are FIFO. The implementation > is described in the comments. The straight-line lock/unlock instruction > sequence is slightly slower than the dec based locks on modern x86 CPUs, > however the difference is quite small on Core2 and Opteron when working out of > cache, and becomes almost insignificant even on P4 when the lock misses cache. > trylock is more significantly slower, but they are relatively rare. > > On an 8 core (2 socket) Opteron, spinlock unfairness is extremely noticable, > with a userspace test having a difference of up to 2x runtime per thread, and > some threads are starved or "unfairly" granted the lock up to 1 000 000 (!) > times. After this patch, all threads appear to finish at exactly the same > time.
There's also a very easy way to get better fairness with our current spinlocks: use xchg to release the lock instead of mov. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[patch 0/4] ticket spinlocks for x86
, Nick Piggin
, (Thu Nov 1, 10:01 am)
Re: [patch 0/4] ticket spinlocks for x86
, Jeremy Fitzhardinge
, (Sat Nov 3, 6:36 pm)
[patch 4/4] x86: spinlock.h merge
, Nick Piggin
, (Thu Nov 1, 10:05 am)
[patch 3/4] x86: spinlock.h merge prep
, Nick Piggin
, (Thu Nov 1, 10:04 am)
[patch 1/4] x86: FIFO ticket spinlocks
, Nick Piggin
, (Thu Nov 1, 10:03 am)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Chuck Ebbert
, (Fri Nov 2, 12:22 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Linus Torvalds
, (Fri Nov 2, 12:51 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Nick Piggin
, (Fri Nov 2, 7:01 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Chuck Ebbert
, (Fri Nov 2, 8:56 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Nick Piggin
, (Fri Nov 2, 11:41 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Chuck Ebbert
, (Thu Nov 1, 4:01 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Nick Piggin
, (Thu Nov 1, 8:00 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Gregory Haskins
, (Thu Nov 1, 10:40 am)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Linus Torvalds
, (Thu Nov 1, 12:38 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Gregory Haskins
, (Fri Nov 2, 10:24 am)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Rik van Riel
, (Thu Nov 1, 8:35 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Linus Torvalds
, (Thu Nov 1, 9:19 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Nick Piggin
, (Fri Nov 2, 2:42 am)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Ingo Molnar
, (Fri Nov 2, 11:33 am)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Nick Piggin
, (Wed Nov 7, 4:46 am)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Rik van Riel
, (Fri Nov 2, 10:05 am)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Nick Piggin
, (Fri Nov 2, 6:37 pm)
Re: [patch 1/4] x86: FIFO ticket spinlocks
, Rik van Riel
, (Thu Nov 1, 10:01 pm)
[patch 1/4] spinlock: lockbreak cleanup
, Nick Piggin
, (Thu Nov 1, 10:02 am)
Re: [patch 1/4] spinlock: lockbreak cleanup
, Peter Zijlstra
, (Thu Nov 1, 10:06 am)
Re: [patch 1/4] spinlock: lockbreak cleanup
, Nick Piggin
, (Thu Nov 1, 10:29 am)
Re: [patch 1/4] spinlock: lockbreak cleanup
, Lee Schermerhorn
, (Thu Nov 1, 11:39 am)
Re: [patch 1/4] spinlock: lockbreak cleanup
, Ingo Molnar
, (Thu Nov 1, 11:46 am)
Re: [patch 1/4] spinlock: lockbreak cleanup
, Nick Piggin
, (Thu Nov 1, 11:53 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
debian developer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
David Brown
Re: Linux 2.6.21-rc2
Greg KH
[GIT PATCH] driver core patches against 2.6.24
git
:
linux-netdev
:
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
David Miller
Re: [GIT]: Networking
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
Re: [BUG] New Kernel Bugs
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
964 guests
online.
Online users
zeekec
nikitab1000@gma...
bridgewayestate
Syndicate