* Linus Torvalds <torvalds@linux-foundation.org> wrote:there was one bad case i can remember: the spinlock debugging code had a trylock open-coded loop and on certain Opterons CPUs were starving each other. This used to trigger with the ->tree_lock rwlock i think, on heavy MM loads. The starvation got so bad that the NMI watchdog started triggering ... interestingly, this only triggered for certain rwlocks. Thus we, after a few failed attempts to pacify this open-coded loop, currently have that code disabled in lib/spinlock_debug.c: #if 0 /* This can cause lockups */ static void __write_lock_debug(rwlock_t *lock) { u64 i; u64 loops = loops_per_jiffy * HZ; int print_once = 1; for (;;) { for (i = 0; i < loops; i++) { if (__raw_write_trylock(&lock->raw_lock)) return; __delay(1); } the weird thing is that we still have the _very same_ construct in __spin_lock_debug(): for (i = 0; i < loops; i++) { if (__raw_spin_trylock(&lock->raw_lock)) return; __delay(1); } if there are any problems with this then people are not complaining loud enough :-) note that because this is a trylock based loop, the acquire+release sequence problem should not apply to this problem. Ingo -
| 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 |
