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

From: Grant Grundler
Date: Wed Jan 28 2004 - 12:01:38 EST


On Wed, Jan 28, 2004 at 08:58:25AM +0000, Russell King wrote:
> On Tue, Jan 27, 2004 at 06:55:17PM -0800, Linus Torvalds wrote:
> > Does anybody see any downsides to something like this?
>
> What if the failing PCI access happened in an interrupt routine?
> (I'm thinking of the situation where you may need to read the PCI
> status registers to find out whether an error occurred.)

The driver needs to be able to clean up in any context.
That's why I'm advocating what willy called an "exception framework".

While I like linus' suggestion is better than the original,
it spreads the driver error recovery code throughout the driver.
That upside is it can handle every situation.
The downside is numerous error paths makes the regular code alot
harder to read and maintain.

> Also, for that matter, what if a network device receives an abort
> while performing BM-DMA?

The next PIO read will see the error caused by BM-DMA.

> Do we even care about either of these two scenarios?

yes. IO Error recovery has to deal with every scenario.

grant
-
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/