On Sat, 23 Aug 2008, Mathieu Desnoyers wrote:EXACTLY. It's not even necessarily a "contention" bit per se - it's literally a "readers have to take the slow-path" bit (writers will obviously _always_ take the slowpath if there is any non-zero value at all, so they don't need it). Then, the slow-path might actually decide that "hey, there is no _actual_ writer there yet - just some _waiting_ writer, but since this read lock is in an interrupt context, we have to let it go through _despite_ the fact that the lock is contended in order to avoid deadlock". So it allows a fast-path for the trivial cases that is literally just a couple of instructions long, and that is nice not just because of performance issues, but because it then means that you can entirely ignore all those things in the slow path. It also means that everybody can look at the fast-path and decide that "ok, the fast-path really is optimal". That fast-path is what a lot of people care more about than just about anything else. The slow-path, in comparison, can be in C, and can do all those checks like "are we in an (sw-)interrupt handler?" and basically prioritize certain classes of people. Linus --
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Trent Piepho | [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
