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

From: Linus Torvalds
Date: Wed Jan 28 2004 - 14:34:52 EST




On Wed, 28 Jan 2004, Matthew Wilcox wrote:
>
> If there are, Linus' interface is probably the best one. If not, we could
> simply have readX_check() / writeX_check() call dev->driver->unregister()
> if they notice an error has occurred and then the driver doesn't even
> need to call read_pcix_errors().

What worries me is that not only can the errors be asynchronous, they may
well be relatively expensive to check for.

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.

The advantage of having the "check for errors" be done later and
independently of the actual IO access itself is not only that I think it
makes the code look nicer - it also allows you to do the IO independently
of the check. Which potentially means that the CPU can burst out the
writes as a burst write, rather than doing them one at a time and then
doing a read of a bridge register in between that serializes everything.

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