From: Anton Blanchard <anton@samba.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] panic: Fix panic_timeout accuracy when running on a hypervisor
Date: Tue, 2 Feb 2010 11:50:02 +1100 [thread overview]
Message-ID: <20100202005002.GA2996@kryten> (raw)
In-Reply-To: <20100201140245.faeec398.akpm@linux-foundation.org>
Hi Andrew,
> > +static void panic_blink_one_second(void)
> > +{
> > + static long i = 0, end;
>
> I assumed the `static' was a brainfart and removed it?
...
> In fact we can simplify it a bit:
>
> --- a/kernel/panic.c~panic-fix-panic_timeout-accuracy-when-running-on-a-hypervisor-fix
> +++ a/kernel/panic.c
> @@ -42,12 +42,10 @@ EXPORT_SYMBOL(panic_blink);
>
> static void panic_blink_one_second(void)
> {
> - static long i = 0, end;
> -
> if (panic_blink) {
> - end = i + MSEC_PER_SEC;
> + long i = 0;
>
> - while (i < end) {
> + while (i < MSEC_PER_SEC) {
> i += panic_blink(i);
> mdelay(1);
> i++;
Unfortunately the panic_blink users seem to rely on count ever increasing:
static long i8042_panic_blink(long count)
{
...
static long last_blink;
...
if (count - last_blink < i8042_blink_frequency)
return 0;
If we reset to 0 each second, this is going to always be true. Ugly interface.
Anton
prev parent reply other threads:[~2010-02-02 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 4:14 [PATCH] panic: Fix panic_timeout accuracy when running on a hypervisor Anton Blanchard
2010-02-01 22:02 ` Andrew Morton
2010-02-02 0:50 ` Anton Blanchard [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=20100202005002.GA2996@kryten \
--to=anton@samba.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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