Re: [PATCH] barrier patch set

From: Jeff Garzik
Date: Sat Mar 20 2004 - 05:38:58 EST


Jens Axboe wrote:
On Sat, Mar 20 2004, Jeff Garzik wrote:

Jens Axboe wrote:

I agree with Bart, it's usually never that clear. Quit harping the
stupid LG issue, they did something brain dead in the firmware and I
almost have to say that they got what they deserved for doing something
as _stupid_ as that.

I use it because it's an excellent illustration of what happens when you ignore the spec.


Really, I think it's a much better demonstration of exactly how stupid
hardware developers are at times...

No argument. But their behavior, however awful, _was_ reported in places where a spec-driven driver would have noticed... :)


Jeff, it's wonderful to think that you can always rely on checking spec
bits, but in reality it never really 'just works out' for any given set
of hardware.

"just issue it and hope" is not a reasonable plan, IMO.


I agree with that as well. I just didn't agree with your rosy idea of
thinking everything would always work if you just check the bits
according to spec.

Everything _will_ always work, if you check the bits according to spec. Not reporting the flush-cache feature bit, when it really the opcode exists, isn't a spec violation. The opposite is, and I haven't heard of any such drives :)

AFAICS:
* for ATA versions where flush-cache is optional, you must check the bit. otherwise, issuing flush-cache would be very unwise.
* for ATA versions where flush-cache is mandatory... the argument can be made that issuing a flush-cache in the absence of the bit isn't a bad thing. I'm not sure I agree with that, but I'm willing to be convinced.

"just check the bits" always works because it is the conservative choice... but it can lead to suboptimal (but valid!) behavior by ignoring some devices' flush-cache capability.

If it's only a few drives out there that misreport their flush-cache bit, then who cares --> just more broken hardware, that we won't issue a flush-cache on. If it's a lot of drives, that changes things...

Jeff


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