Skip to contentSkip to conversation

sata_sil24: configure max read request size to 4k

PATCH Applied Tejun Heo 2 participants 2 messages Oct 25, 2008 – Oct 28, 2008 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 sata_sil24: configure max read request size to 4k

Due to request posting limitations, bandwidth of sil3132 is limited to around 120MB/s with the minimum pci-e payload size (128bytes) which is used by most consumer systems. However, write throughput can be slightly (~3%) increased by increasing the max read requeset size. Configure it to 4k which is the maximum supported. This optimization is also done by SIMG's windows driver.

---
 drivers/ata/sata_sil24.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/ata/sata_sil24.c +5 -0
index 4621807..ccee930 100644
@@ -1329,6 +1329,11 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		}
 	}
 
+	/* Set max read request size to 4096.  This slightly increases
+	 * write throughput for pci-e variants.
+	 */
+	pcie_set_readrq(pdev, 4096);
+
 	sil24_init_controller(host);
 
 	pci_set_master(pdev);
Applied
#1 lore raw
Quoted 16 lines · Tejun Heo

Due to request posting limitations, bandwidth of sil3132 is limited to around 120MB/s with the minimum pci-e payload size (128bytes) which is used by most consumer systems. However, write throughput can be slightly (~3%) increased by increasing the max read requeset size. Configure it to 4k which is the maximum supported. This optimization is also done by SIMG's windows driver.

---
 drivers/ata/sata_sil24.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/ata/sata_sil24.c +0 -0
index 4621807..ccee930 100644

drivers/ata/sata_sil24.c static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · line 1338

Quoted 10 lines
drivers/ata/sata_sil24.c +5 -0
@@ -1329,6 +1329,11 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 		}
 	}
 
+	/* Set max read request size to 4096.  This slightly increases
+	 * write throughput for pci-e variants.
+	 */
+	pcie_set_readrq(pdev, 4096);
+
 	sil24_init_controller(host);
 

applied