On Thu, 9 Mar 2006, Paul Mackerras wrote: > > A spin_lock does show up on the bus, doesn't it? Nope. If the lock entity is in a exclusive cache-line, a spinlock does not show up on the bus at _all_. It's all purely in the core. In fact, I think AMD does a spinlock in ~15 CPU cycles (that's the serialization overhead in the core). I think a P-M core is ~25, while the NetBurst (P4) core is much more because they have horrible serialization issues (I think it's on the order of 100 cycles there). Anyway, try doing a spinlock in 15 CPU cycles and going out on the bus for it.. (Couple that with spin_unlock basically being free). Now, if the spinlocks end up _bouncing_ between CPU's, they'll obviously be a lot more expensive. Linus - 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] Document Linux's memory barriers [try #2]
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Alan Cox <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Alan Cox <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Alan Cox <[email protected]>
- [PATCH] Document Linux's memory barriers
- From: David Howells <[email protected]>
- [PATCH] Document Linux's memory barriers [try #2]
- From: David Howells <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: David Howells <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: David Howells <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: David Howells <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: David Howells <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Paul Mackerras <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Paul Mackerras <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- From: Paul Mackerras <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #2]
- Prev by Date: Re: [2.6.16-rc5-m3 PATCH] inotify: add the monitor for the event source
- Next by Date: Re: [PATCH] reduce syslog clutter (take 2)
- Previous by thread: Re: [PATCH] Document Linux's memory barriers [try #2]
- Next by thread: Re: [PATCH] Document Linux's memory barriers [try #2]
- Index(es):