From: Ingo Molnar <mingo@elte.hu>
To: Andi Kleen <ak@suse.de>
Cc: torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Prevent spinlock debug from timing out too early
Date: Tue, 7 Feb 2006 00:22:54 +0100 [thread overview]
Message-ID: <20060206232254.GA13566@elte.hu> (raw)
In-Reply-To: <200602062242.30897.ak@suse.de>
* 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
prev parent reply other threads:[~2006-02-06 23:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 21:16 [PATCH] Prevent spinlock debug from timing out too early Andi Kleen
2006-02-06 21:36 ` Ingo Molnar
2006-02-06 21:42 ` Andi Kleen
2006-02-06 23:22 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060206232254.GA13566@elte.hu \
--to=mingo@elte.hu \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox