On 11/22/24 3:00 AM, Bart Van Assche wrote: > On 11/20/24 7:20 PM, Damien Le Moal wrote: >> I am only trying to see if there is not a simpler approach than what you did. >> The less changes, the better, right ? > > Hi Damien, > > I agree with you that we should select the simplest approach that yields > the desired performance. > > Regarding the proposed approach, forcing unplugging a zone write plug > from the driver once a command is passed to the driver and the driver > did not reject it, is this approach compatible with SCSI devices that > may report a unit attention? If two zoned writes for the same zone are > submitted in order to a SCSI device and the SCSI device responds with a > unit attention condition to the first write then the second write will > fail with an "unaligned write" error. This will have to be handled by I have never seen this happen (i mean UNIT ATTENTION being returned) in practice with SAS HDDs. Not sure how zoned UFS devices behave though. > pausing zoned write submission and by resubmitting zoned writes after > all pending zoned writes for the given zone have completed. In other > words, if higher queue depths are supported per zone, we cannot avoid > increasing the complexity of the code in block/blk-zoned.c. If we cannot > avoid increasing the complexity of that code, I think we can as well > select the approach that yields the highest performance and the fewest > changes in the block layer code for regular reads and writes. But it seems that all we need to do is a better request handling in the requeue+dispatch queue to handle requeued writes. I am not yet convinced that zone write plugging needs a lot of changes beside allowing more than one write per zone and some form of throttling based on feedback from the requeue path. I.e. the current code throttles write command issuing every time one command is submitted: the submission "plugs" the write plug. In your case, it seems that the plugging should be driven by the requeue path, or the driver. Unplugging of a plug happens currently when a BIO completes, but in your case, it would need to be also driven by the requeue path or driver. I am thinking that things could be cleaner/easier to maintain with a zoned write requeue special path. May be... I am thinking aloud here as I have not tried to code anything. > > Thanks, > > Bart. > > -- Damien Le Moal Western Digital Research