From: Mark Lord <lkml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: bzolnier@milosz.na.pl, Lee Revell <rlrevell@joe-job.com>,
Greg Stark <gsstark@mit.edu>,
Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Todd Poynor <tpoynor@mvista.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
tim.bird@am.sony.com, dsingleton@mvista.com
Subject: Re: [PATCH] Configure IDE probe delays
Date: Wed, 01 Sep 2004 11:36:36 -0400 [thread overview]
Message-ID: <4135EC84.6070407@rtr.ca> (raw)
In-Reply-To: <4135E017.1000901@pobox.com>
> Doing this is either pointless or impossible on newer SATA controllers.
> Most are memory-mapped I/O not PIO, where the high-order bits of the
> ATA taskfile are accessed due to an extended register size, not
> "double-pumping" a FIFO.
>
> Even-newer SATA controllers are FIS-based rather than taskfile-based, so
> you pass it a FIS (containing all the registers) unconditionally.
PCI accesses are not free, so anything that avoids having to
go over the PCI bus is a worthwhile optimization.
The processor buses run at 200-800Mhz or so, whereas PCI is normally
only clocking at 33Mhz, sometimes at 66Mhz.
With good ADMA or host-queuing controllers that access system
memory directly for their command blocks, then there's not much
(if any) penalty for the extra LBA48 setup. But for "normal"
controllers (if such a beast even exists), the extra writes across
the PCI bus can be costly.
Hardware write-buffer FIFOs between the CPU and the PCI bus
can reduce the impact of this somewhat, but they are often
only 2-4 entries deep, and will be filled by a normal (S)ATA
command setup sequence.
This is one of those finer points that is very difficult to measure,
since the I/O throughput is pretty much unaffected by it. But CPU
cycle count per-I/O setup is one way to measure it.
Cheers
--
Mark Lord
(hdparm keeper & the original "Linux IDE Guy")
Jeff Garzik wrote:
> Mark Lord wrote:
>
>> Bartlomiej Zolnierkiewicz wrote:
>>
>>>
>>>> What determines whether 48 bit addressing will be used then?
>>>
>>>
>>>
>>> Availability of 48-bit addressing feature set and host capabilities
>>> (some don't support LBA48 when DMA is used etc.).
>>
>>
>>
>> I haven't examined the "released" IDE drivers in some time,
>> but one optimisation that can save a LOT of CPU usage
>> is for the driver to only use LBA48 *when necessary*,
>> and use LBA28 I/O otherwise.
>>
>> Each access to an IDE register typically chews up 600+ns,
>> or the equivalent of a couple thousand instruction executions
>> on a modern core. Avoiding LBA48 when it's not needed will
>> save four such accesses per I/O, or about 2.5us.
>
>
>
> Doing this is either pointless or impossible on newer SATA controllers.
> Most are memory-mapped I/O not PIO, where the high-order bits of the
> ATA taskfile are accessed due to an extended register size, not
> "double-pumping" a FIFO.
>
> Even-newer SATA controllers are FIS-based rather than taskfile-based, so
> you pass it a FIS (containing all the registers) unconditionally.
>
> Jeff
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2004-09-01 15:40 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-30 19:11 [PATCH] Configure IDE probe delays Todd Poynor
2004-07-30 21:36 ` Lee Revell
2004-07-30 22:35 ` Alan Cox
2004-07-31 0:12 ` Lee Revell
[not found] ` <200407311434.59604.vda@port.imtp.ilyichevsk.odessa.ua>
2004-07-31 18:00 ` Lee Revell
2004-08-27 17:45 ` Greg Stark
2004-08-27 17:53 ` Lee Revell
2004-08-27 18:05 ` Bartlomiej Zolnierkiewicz
2004-08-27 18:08 ` Lee Revell
2004-08-27 18:59 ` Bartlomiej Zolnierkiewicz
2004-09-01 13:20 ` Mark Lord
2004-09-01 14:43 ` Jeff Garzik
2004-09-01 15:30 ` Mark Lord
2004-09-01 15:36 ` Mark Lord [this message]
2004-09-01 19:36 ` Lee Revell
2004-09-01 18:42 ` Alan Cox
2004-09-01 15:06 ` Alan Cox
2004-09-01 19:08 ` Lee Revell
2004-09-02 16:04 ` Mark Lord
2004-09-01 15:40 ` Bartlomiej Zolnierkiewicz
2004-07-31 18:06 ` Lee Revell
2004-07-31 19:35 ` Alan Cox
2004-07-31 21:35 ` Lee Revell
2004-07-31 21:44 ` Jeff Garzik
2004-07-31 22:12 ` Lee Revell
2004-08-04 17:30 ` Anthony de Boer
2004-08-05 21:39 ` Tim Bird
2004-07-31 0:54 ` Jeff Garzik
2004-08-03 17:47 ` Mark Lord
2004-08-06 15:48 ` Jeff Garzik
2004-08-06 19:29 ` Tim Bird
2004-08-06 20:46 ` Todd Poynor
2004-08-02 21:56 ` Tim Bird
2004-08-02 21:01 ` Alan Cox
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=4135EC84.6070407@rtr.ca \
--to=lkml@rtr.ca \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bzolnier@milosz.na.pl \
--cc=dsingleton@mvista.com \
--cc=gsstark@mit.edu \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rlrevell@joe-job.com \
--cc=tim.bird@am.sony.com \
--cc=tpoynor@mvista.com \
--cc=vda@port.imtp.ilyichevsk.odessa.ua \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox