On Thu, 21 Jun 2007, Ingo Molnar wrote:Your parch kept doing "spin_trylock()", didn't it? That's a read-modify-write thing, and keeps bouncing the cacheline back and forth, and together with the fact that even *after* you get the spinlock the "wait_for_inactive()" would actually end up looping back, releasing it, and re-getting it. So the problem was that "wait_for_inactive()" kept the lock (because it actually *got* it), and looped over getting it, and because it was an exclusive cacheline ownership, that implies that somebody else is not getting it, and is kept from ever getting it. So trying to use "trylock" doesn't help. It still has all the same bad sides - it still gets the lock (getting the lock wasn't the problem: _holding_ the lock was the problem), and it still kept the cache line for the lock on one core. The only way to avoid lock contention is to avoid any exclusive use at all. Linus -
| Fernando Luis | [PATCH] affinity is not defined in non-smp kernels - i386 (v2) |
| FUJITA Tomonori | Re: Integration of SCST in the mainstream Linux kernel |
| Tvrtko A. Ursulin | Out of tree module using LSM |
| Andi Kleen | [PATCH] [9/58] x86_64: Always use builtin memcpy on gcc 4.3 |
git: | |
| Dmitry Kakurin | Re: [RFC] Convert builin-mailinfo.c to use The Better String Library. |
| Linus Torvalds | Re: several quick questions |
| Scott Chacon | [PATCH] add a 'pre-push' hook |
| Junio C Hamano | Re: Change set based shallow clone |
| Richard Stallman | Real men don't attack straw men |
| Paul Greidanus | Re: [Fwd: Open-Hardware] |
| Richard Daemon | Nfsen and php problems...? |
| Marco Peereboom | Re: Real men don't attack straw men |
| David Miller | [GIT]: Networking |
| David Miller | Re: 2.6.25-rc8: FTP transfer errors |
| Steve Wise | pktgen question |
| James Bottomley | Re: [BUG] New Kernel Bugs |
