maximum ide request size reduced with 2.5.15-git?
Hi,
it seems that the maximum request size for my hard drive was reduced with one of the patches between 2.6.15 and 2.6.15-git10.
diff between 2.6.15 and 2.6.15-git10 follows:
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH4: IDE controller at PCI slot 0000:00:1f.1
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 5
ACPI: PCI Interrupt 0000:00:1f.1[A] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
ICH4: chipset revision 3
ICH4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:pio, hdd:pio Probing IDE interface ide0...
hda: SAMSUNG MP0804H, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: DV-W24ES, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
-hda: max request size: 1024KiB
+hda: max request size: 512KiB
hda: 156368016 sectors (80060 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 hda10 >
hdc: ATAPI 24X DVD-ROM DVD-R-RAM CD-R/RW drive, 2193kB Cache Uniform CD-ROM driver Revision: 3.20
Will this affect performance, and if so, how can I get the old settings back?
Regards,
Carl-Daniel
Quoted 30 lines · Carl-Daniel Hailfinger
Hi,
it seems that the maximum request size for my hard drive was reduced with one of the patches between 2.6.15 and 2.6.15-git10.
diff between 2.6.15 and 2.6.15-git10 follows:
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH4: IDE controller at PCI slot 0000:00:1f.1
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 5
ACPI: PCI Interrupt 0000:00:1f.1[A] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
ICH4: chipset revision 3
ICH4: not 100% native mode: will probe irqs lateride0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:pio, hdb:pio ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:pio, hdd:pioProbing IDE interface ide0...
hda: SAMSUNG MP0804H, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: DV-W24ES, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15(quoted diff) +1
-1-hda: max request size: 1024KiB +hda: max request size: 512KiB hda: 156368016 sectors (80060 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100) hda: cache flushes supported hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 hda10 > hdc: ATAPI 24X DVD-ROM DVD-R-RAM CD-R/RW drive, 2193kB Cache Uniform CD-ROM driver Revision: 3.20
Quoted 2 lines
Will this affect performance, and if so, how can I get the old settings back?
It's done for latency reasons. For IDE, there really isn't a difference with 512 vs 1024 in throughput, since the command overhead is pretty low.
What IDE prints above is the software max, the hardware max is still capped at 2048 sectors (which could be 64k with your lba48 drive). If you wish, you could increase the size by echoing a larger amount to /sys/block/dev/queue/max_sectors_kb as long as it doesn't exceed max_hw_sectors_kb.
If you apply this patch, you will still get 512kb software size set, but it allows you to set it as high as the hardware supports (which is really the intention for drivers).
drivers/ide/ide-disk.c +2 -2
@@ -906,7 +906,7 @@ static void idedisk_setup (ide_drive_t *if (drive->addressing ==1 ) {ide_hwif_t *hwif =HWIF (drive); -int max_s =2048 ; +int max_s =65536 ;if (max_s > hwif->rqsize) max_s = hwif->rqsize;
@@ -914,7 +914,7 @@ static void idedisk_setup (ide_drive_t *blk_queue_max_sectors (drive->queue, max_s); } -printk (KERN_INFO "%s: max request size: %dKiB\n" , drive->name, drive->queue->max_sectors /2 ); +printk (KERN_INFO "%s: max request size: %dKiB\n" , drive->name, drive->queue->max_hw_sectors /2 );/* calculate drive capacity, and select LBA if possible */ init_idedisk_capacity (drive);
Signature · 1 line
Jens Axboe
Quoted 62 lines · Jens Axboe
Quoted 30 lines · Carl-Daniel Hailfinger
Hi,
it seems that the maximum request size for my hard drive was reduced with one of the patches between 2.6.15 and 2.6.15-git10.
diff between 2.6.15 and 2.6.15-git10 follows:
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH4: IDE controller at PCI slot 0000:00:1f.1
PCI: Enabling device 0000:00:1f.1 (0005 -> 0007)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 5
ACPI: PCI Interrupt 0000:00:1f.1[A] -> Link [LNKC] -> GSI 5 (level, low) -> IRQ 5
ICH4: chipset revision 3
ICH4: not 100% native mode: will probe irqs lateride0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:pio, hdb:pio ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:pio, hdd:pioProbing IDE interface ide0...
hda: SAMSUNG MP0804H, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: DV-W24ES, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15(quoted diff) +1
-1-hda: max request size: 1024KiB +hda: max request size: 512KiB hda: 156368016 sectors (80060 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100) hda: cache flushes supported hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 hda10 > hdc: ATAPI 24X DVD-ROM DVD-R-RAM CD-R/RW drive, 2193kB Cache Uniform CD-ROM driver Revision: 3.20Quoted 2 lines
Will this affect performance, and if so, how can I get the old settings back?
It's done for latency reasons. For IDE, there really isn't a difference with 512 vs 1024 in throughput, since the command overhead is pretty low.
What IDE prints above is the software max, the hardware max is still capped at 2048 sectors (which could be 64k with your lba48 drive). If you wish, you could increase the size by echoing a larger amount to
/sys/block/dev/queue/max_sectors_kbas long as it doesn't exceedmax_hw_sectors_kb.If you apply this patch, you will still get 512kb software size set, but it allows you to set it as high as the hardware supports (which is really the intention for drivers).
drivers/ide/ide-disk.c +1
-1@@ -906,7 +906,7 @@ static void idedisk_setup (ide_drive_t *if (drive->addressing ==1 ) {ide_hwif_t *hwif =HWIF (drive); -int max_s =2048 ; +int max_s =65536 ;if (max_s > hwif->rqsize) max_s = hwif->rqsize;
drivers/ide/ide-disk.c static void idedisk_setup (ide_drive_t * · line 920
Quoted 8 lines
drivers/ide/ide-disk.c +1
-1@@ -914,7 +914,7 @@ static void idedisk_setup (ide_drive_t *blk_queue_max_sectors (drive->queue, max_s); } -printk (KERN_INFO "%s: max request size: %dKiB\n" , drive->name, drive->queue->max_sectors /2 ); +printk (KERN_INFO "%s: max request size: %dKiB\n" , drive->name, drive->queue->max_hw_sectors /2 );/* calculate drive capacity, and select LBA if possible */ init_idedisk_capacity (drive);
woops, that overflows ->max_hw_sectors actually. Use 65535 instead :-)
Signature · 1 line
Jens Axboe