Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux