Skip to content

libata: implement 32-bit transfers for PIO mode

Willy Tarreau linux-ide lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libata: implement ATA_IOC_GET_IO32/ATA_IOC_SET_IO32 ioctlsdrivers/ata/libata-scsi.c include/linux/libata.h+63 -83 replies
2/2libata: implement support for 32-bit PIO transfersdrivers/ata/libata-core.c+32 -141 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAlan Cox
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] libata: implement 32-bit transfers for PIO mode

Hi Jeff,

For several times I tried libata on small machines equipped with either CompactFlash or IDE DOM (Disk-On-Module). All those machines with small flashes (<= 256 MB) were about 35-40% slower under libata than under the plain old IDE driver. I realized that all the slower ones were running PIO only.

Today I had time to investigate the issue on a Geode LX board. At first I thought it was the pata_cs5536 driver which would have incorrect timings, but this was not the case. I finally noticed that under IDE, my flashes were running in 32-bit mode while I could not enable 32-bit with libata.

Reading ata_data_xfer() made it obvious that transfers were only 16-bit wide.

Thus, I have implemented the 32-bit mode to bring the performance back to the level of the old IDE driver. I jumped from 1.5 MB/s to 2.5 MB/s, which is an important difference at this level of performance, especially when large files are read. The 32-bit mode is enabled using the ioctl which is already implemented but only accepts a null value.

I'm joining two patches which I hope you'll consider for inclusion. I've updated them to latest Linus' git.

Best regards,
Willy