Re: Device loses barrier support (was: Fixed patch for simple barriers.)

Bodo Eggert
2008-12-05T18:21:23Z

Andi Kleen <andi@firstfloor.org> wrote:

>> Not when the fundamental design of the code is broken and trashes
>> performance.
>
> Sorry but that's just not correct. There's nothing in late failing
> barriers that "trashes performance". The file system writers have
> to be careful to handle it, but at least the current ones all do.

So let's keep requiring the "trashes performance" hacks, because they're
not directly in the barriers code? Hey, we nailed one foot to the ground,
and since it's not the nail's fault, let's do the same to the other foot?
It does not matter, since we can't move around right now, so it's a pretty
neat idea, isn't it?

> And also if someone writes a hypothetical fully asynchronously driven
> barrier based IO transaction system it would be still possible to handle
> the late failing barrier without too many complications.

You can just replace barriers with NOPs without too many complications,
because it only matters in cases of system failure. And even then,
it's only the difference between having a filesystem corruption and not
having it ... Who'd care?

> Also late failing barriers is pretty much the only sane way to implement
> barriers in software remapping schemes like DM and MD.

No, and seeing the same resubmit logic in more than one place should give
you the clue, even if you don't grasp that intermixing requests which
explicitely MUST NOT be intermixed is wrong.

The sane way is having a software barrier in DM and MD, going back to
sync if the new hardware does not support barriers in hardware. The
filesystems should not even need to know if barriers are supported,
just use them and they'll DTRT in any case. Any other interface is
worse than useless.