On Tue, Oct 25, 2022 at 05:59:07PM +0900, Damien Le Moal wrote: > > Sure, that would be the way I would be going. > > If the drive supports NCQ we should always be using the FPDMA variants, > > irrespective of the queue depth. > > Additionally we _might_ make FUA dependent on NCQ, and disallow FUA for > > non-NCQ drives. > > (Where it's questionable anyway; if you only have a single command > > outstanding the pressure on any internal cache is far less as with NCQ.) > > Yes, that is my thinking too. Will try this and see how it looks. When there are too many NCQ errors, flag ATA_DFLAG_NCQ_OFF will get set (but queue depth will be left unchanged). Currently, one way to re-enable NCQ is to change queue_depth to 1 in sysfs, and then set it back to 32. It would be nice if this method, or some other method to re-enable NCQ after encountering too many NCQ errors, would still be available after your suggested changes. And if we change to always use NCQ commands regardless of queue depth (for devices supporting it), because it provides us with additional fields not available in the non-NCQ versions... then I think that we should also consider always using WRITE DMA EXT (on devices supporting 48-bit addresses), when NCQ is not supported (or disabled because of too many errors), since it also has additional fields not available in the regular WRITE DMA command (especially considering that they should have the exact same performance). Kind regards, Niklas