public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Andi Kleen <andi@firstfloor.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Arjan van de Ven <arjan@infradead.org>,
	Yinghai Lu <yinghai@kernel.org>
Subject: Re: reason for delay in arch/x86/kernel/traps.c::io_check_error()?
Date: Thu, 12 Mar 2009 10:20:40 -0600	[thread overview]
Message-ID: <49B93658.8050505@nortel.com> (raw)
In-Reply-To: <20090310153242.GA23463@elte.hu>

Ingo Molnar wrote:
> * Chris Friesen <cfriesen@nortel.com> wrote:
> 
>> Hi all,
>>
>> I was just wondering about the basis for the delay in 
>> io_check_error().  The ICH7 manual doesn't have any mention of 
>> a delay being required here--is it necessary for other 
>> hardware, something not mentioned in the manual, or just an 
>> accident?
> 
> That code has seriously bitrotten along the years. All those 
> port 61H accesses:
> 
> arch/x86/kernel/traps.c:                reason = get_nmi_reason();
> arch/x86/kernel/traps.c:        outb(reason, 0x61);
> arch/x86/kernel/traps.c:        outb(reason, 0x61);
> arch/x86/kernel/traps.c:        outb(reason, 0x61);
> 
> ... are often wrong on modern chipsets - including the logic in 
> io_check_error(). But we dont really have lowlevel chipset 
> drivers on this level in Linux, so there's nothing suitable to 
> replace it with and it never got fixed.
> 
> Can you see this trigger on a box perhaps? Or are you worried 
> about the potential unbound execution time of this function 
> which can be up to 2 seconds in NMI context?

This is in the context of an embedded highly available compute blade. 
As part of our enhanced error handling we've modified the memory parity 
error code to reenable rather than disable the error line.

Given that the memory and IO code paths are just different bits in the 
same register we originally added the delay to the memory parity path as 
well.  However, we subsequently hit the memory parity error path, and 
the 2sec delay triggered our hardware watchdog causing the board to reboot.

As you can imagine this is undesirable, so we were hoping to remove the 
delay from both paths.  From what you've said and the fact that no delay 
is mentioned in the chip manual, it seems like this should be fairly safe.

Thanks,
Chris

      reply	other threads:[~2009-03-12 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09 19:33 reason for delay in arch/x86/kernel/traps.c::io_check_error()? Chris Friesen
2009-03-10  3:49 ` Andi Kleen
2009-03-10 15:32 ` Ingo Molnar
2009-03-12 16:20   ` Chris Friesen [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=49B93658.8050505@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.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