scsi write barriers (ordered tags)?
Today regarding his message about ide write barriers I got the following message:
Quoted 28 lines · Jens Axboe
Quoted 8 lines · Jordan Breeding
Quoted 6 lines · Jens Axboe
Hi,
The attached patch implements write barrier operations in the block layer and for IDE, specifically. The goal is to make the use of write back cache enabled ide drives safe with journalled file systems.
Quoted 5 lines
Quoted 3 lines
Patch is against 2.4.21-pre4-bk as of today, and includes a small patch to enable it on ext3. Chris has a patch for reiserfs as well.
Does the above mean that the patch only works for IDE and not for SCSI?
The above is just for IDE.
Quoted 1 line
If so when will SCSI be able to use write back cache safely? Also,
Hmmm well, it's simple enough to make the low level driver generate an ordered tag when appropriate, but it's very tricky to make sure that no re-ordering takes place in case of errors, timeouts, etc.
Quoted 6 lines
Quoted 1 line
will this patch be ported to 2.5.x or is it already present there? Thanks.
Block layer infrastructure is there, has been since bio was merged in 2.5.1-pre. The ide bits will be send for inclusion shortly.
The part I am concerned with is his statement about SCSI being harder to implement this on. I guess this doesn't matter as much since my SCSI drive with write back cache off is faster than any IDE drive I have used with it on, but still it would be nice to be able to run both type of drives with the write back cache on. So my question is, are the things Jens stated above about SCSI enough to keep this feature completely out of 2.5.x even once IDE has the code merged, or will SCSI be able to have this feature as well by 2.6? Thanks for any info and/or speculation about this.
Jordan
Quoted 9 lines · Jordan Breeding
The part I am concerned with is his statement about SCSI being harder to implement this on. I guess this doesn't matter as much since my SCSI drive with write back cache off is faster than any IDE drive I have used with it on, but still it would be nice to be able to run both type of drives with the write back cache on. So my question is, are the things Jens stated above about SCSI enough to keep this feature completely out of 2.5.x even once IDE has the code merged, or will SCSI be able to have this feature as well by 2.6? Thanks for any info and/or speculation about this.
There are two really significant differences between SCSI and IDE with regard to barrier implementation (the basic one is that SCSI has a more complex queueing model).
1) SCSI devices can have multiple simultaneously outstanding commands
2) Some SCSI devices (like high end arrays) have huge caches, so you can't implement a barrier simply by flushing the cache, like IDE does, because that might cause significant slow downs.
As Jens says, there are ways to do this, and we do have most of the infrastructure in place. However, we'd need different error recovery behaviour for a complete solution, and no-one's done that work yet.
Finally, even if the error recovery work is done, drivers which use internal issue queues would probably need modifying to do the right thing on ordered tag error return (and that's quite a huge effort).
James