Messages in this thread | | | Subject | Re: [patch] increase spinlock-debug looping timeouts (write_lock and NMI) | From | Arjan van de Ven <> | Date | Tue, 20 Jun 2006 15:04:52 +0200 |
| |
> Correct me if I'm wrong, but... a read-lock requires at most a single > cacheline transfer per lock acq and a single per release, no matter the > concurrency on the lock (so long as it is read only). > > A spinlock is going to take more. If the hardware perfectly round-robins > the cacheline, it will take lockers+1 transfers per lock+unlock.
This is a bit too simplistic view; shared cachelines are cheap, it's getting the cacheline exclusive (or transitioning to/from exclusive) that is the expensive part...
(note that our spinlocks are fixed nowadays to only do the slowpath side of things for read, eg allow shared cachelines there)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |