From: Jens Axboe <axboe@suse.de>
To: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Cc: linux-ide@vger.kernel.org
Subject: Re: maximum ide request size reduced with 2.5.15-git?
Date: Mon, 16 Jan 2006 13:38:03 +0100 [thread overview]
Message-ID: <20060116123803.GB3945@suse.de> (raw)
In-Reply-To: <20060116123637.GA3945@suse.de>
On Mon, Jan 16 2006, Jens Axboe wrote:
> On Sat, Jan 14 2006, Carl-Daniel Hailfinger wrote:
> > 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?
>
> 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).
>
> diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
> index ca25f9e..6c55899 100644
> --- a/drivers/ide/ide-disk.c
> +++ b/drivers/ide/ide-disk.c
> @@ -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);
woops, that overflows ->max_hw_sectors actually. Use 65535 instead :-)
--
Jens Axboe
prev parent reply other threads:[~2006-01-16 12:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-14 19:17 maximum ide request size reduced with 2.5.15-git? Carl-Daniel Hailfinger
2006-01-16 12:36 ` Jens Axboe
2006-01-16 12:38 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060116123803.GB3945@suse.de \
--to=axboe@suse.de \
--cc=c-d.hailfinger.devel.2006@gmx.net \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.