Re: [patch] increase spinlock-debug looping timeouts (write_lockand NMI)
From: Nick Piggin
Date: Tue Jun 20 2006 - 12:45:50 EST
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/