Re: [patch 1/4] x86: FIFO ticket spinlocks

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Rik van Riel <riel@...>, Gregory Haskins <gregory.haskins.ml@...>, Linux Kernel Mailing List <linux-kernel@...>, Andi Kleen <ak@...>, Ingo Molnar <mingo@...>
Date: Friday, November 2, 2007 - 2:42 am

On Thu, Nov 01, 2007 at 06:19:41PM -0700, Linus Torvalds wrote:

That's quite incredible, considering that the CPUs actually _taking_
the locks also drop the locks and do quite a bit of work before taking
them again (ie. they take them to pull pages off the LRU, but then
do a reasonable amount of work to remove each one from pagecache before
refilling from the LRU).

Possibly actually that is a *more* difficult case for the HW to handle:
once the CPU actually goes away and operates on other cachelines, it 
may get a little more difficult to detect that it is causing starvation
issues.



I'd almost agree, but there are always going to be corner cases where
we get multiple contentions on a spinlock -- the fact that a lock is
needed at all obviously suggests that it can be contended. The LRU locking
could be improved, but you could have eg. scheduler runqueue lock starvation
if the planets lined up just right, and it is a little more difficult to
improve on runqueue locking.

Anyway, I also think this is partially a hardware issue, and as muliple
cores, threads, and sockets get more common, I hope it will improve (it
affects Intel CPUs as well as AMD). So it is possible to have an option
to switch between locks if the hardware is fairer, but I want to get
as much exposure with this locking as possible for now, to see if there
is any funny performance corner cases exposed (which quite possibly will
turn out to be caused by suboptimal locking itself).

Anyway, if this can make its way to the x86 tree, I think it will get
pulled into -mm (?) and get some exposure...

-
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)