Nick Piggin wrote:
And either way, spinlocks are still much more costly than rwlocks, because they still have that first exclusive request, who's effectiveness deteriorates under load. That you *also* have these follow on shared accesses (which will need to be invalidated somehow later anyway), doesn't make them better than read locks.
I shouldn't say much more costly.... Much more costly when looking at the limit case (and we traditionally rather look at the common case in Linux, and in those cases spinlocks _can_ be faster). However in the limit, spinlocks scale O(N), while readlocks scale O(1), where N is the number of CPUs trying to take the lock. AFAIKS. But if they're causing stability problems, I have no arguments against converting them to spinlocks. It might even result in a worldwide net saving of CPU cycles, for what that's worth ;) -- SUSE Labs, Novell Inc.Send instant messages to your online friends http://au.messenger.yahoo.com -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Dave Olson <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Andrew Morton <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Nick Piggin <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Ingo Molnar <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Nick Piggin <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Ingo Molnar <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Nick Piggin <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Arjan van de Ven <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Nick Piggin <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Arjan van de Ven <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- From: Nick Piggin <[email protected]>
- Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- Prev by Date: Re: batched write
- Next by Date: Re: statistics infrastructure (in -mm tree) review
- Previous by thread: Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- Next by thread: Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)
- Index(es):