Re: [RFC/PATCH, 2/4] readX_check() performance evaluation

From: Andi Kleen
Date: Wed Jan 28 2004 - 15:17:09 EST


On Wed, 28 Jan 2004 12:06:12 -0800 (PST)
Linus Torvalds <torvalds@xxxxxxxx> wrote:

>
>
> On Wed, 28 Jan 2004, Andi Kleen wrote:
> >
> > On Wed, 28 Jan 2004 11:33:33 -0800 (PST)
> > Linus Torvalds <torvalds@xxxxxxxx> wrote:
> >
> > > For example, if checking for an error involves actually reading a value
> > > from a bridge register, then that implies some _serious_ amount of
> > > serialization and external CPU stuff.
> >
> > Which is _extremly_ hard to do from an MCE handler ...
>
> So don't do it in the MCE handler.
>
> Just set a flag aka "may need checking", and let the check be done by the
> actual "read_pcix_error()" code.

Where would you put the flag?

Doing it global may give false errors for the wrong device with async MCEs
and on SMP.

For putting it into the pci_dev you need to take logs to walk the list.
If you delay it to a softirq for safely getting the lock it would be set too late.

Putting it into a different table indexed by pci index would be also racy
with hotplug.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/