Messages in this thread | | | Date | Tue, 7 Feb 2006 00:22:54 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH] Prevent spinlock debug from timing out too early |
| |
* Andi Kleen <ak@suse.de> wrote:
> > a better solution would be to call __delay(1) after the first failed > > attempt, that would make the delay at least 1 second long. It seems > > __delay() is de-facto exported by every architecture, so we can rely on > > it in the global spinlock code. > > > > So how about the patch below instead? > > Are you sure loops_per_jiffie is always in delay(1) units?
there are a few explicit calls to __delay() in drivers/*, so i'd assume so. A grep also seems to suggest so:
./ppc/xmon/xmon.c:extern inline void __delay(unsigned int loops) ./x86_64/lib/delay.c:void __delay(unsigned long loops) ./sparc64/lib/delay.c:void __delay(unsigned long loops) ./sh64/lib/udelay.c:void __delay(int loops) ./m32r/lib/delay.c:void __delay(unsigned long loops) ./i386/lib/delay.c:void __delay(unsigned long loops) ./s390/lib/delay.c:void __delay(unsigned long loops) ./sh/lib/delay.c:void __delay(unsigned long loops) ./powerpc/kernel/time.c:void __delay(unsigned long loops)
but yes, this is a non-specified thing so far, so there could be problems on some platforms. Worst-case we never time out - which could be detected via the NMI watchdog or the soft-lockup watchdog - so it's not like they would go unnoticed.
Ingo - 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/
| |