All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-06  6:01 Strange PMAC IDE performance problem Paul Mackerras
@ 1999-01-06 16:02 ` Benjamin Herrenschmidt
  1999-01-07 11:12   ` Timothy A. Seufert
  0 siblings, 1 reply; 10+ messages in thread
From: Benjamin Herrenschmidt @ 1999-01-06 16:02 UTC (permalink / raw
  To: tas, linuxppc-dev, Paul.Mackerras


On Wed, Jan 6, 1999, Paul Mackerras <paulus@cs.anu.edu.au> wrote:

>I found a register at 0xf3020200 on my powermac G3 which affects the
>speed of disk transfers.  This is at offset 0x200 from the base
>address of the IDE interface and it is a 32-bit little-endian
>register.  After booting Linux, it has 0x2f8526 in it, but under MacOS
>it has 0x211025.  Putting 0x211025 in (with xmon) increased the speed
>reported by hdparm -tT /dev/hda from 1.89MB/s to 9.7MB/s !  The disk
>is a WDC 24300ACL (as reported by hdparm -i /dev/hda).  The other
>hdparm settings were -d1 -u1 -m16.

I tried the manipulation with xmon on my wallstreet PowerBook, using
today's vger 2.2-pre4 and hdparam test jumped from 1.88Mb/s to 6.3MB/s
!!! (At first, I forgot to flush the caches, so I got 50Mb/s ;-)

Also, the register is replicated all the way from +0x200 to +0x3FF so it
looks like it's really a single register sitting there.

That's great !


-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Great IDE perf (WAS: Strange PMAC IDE performance)
       [not found] <19990106170222.030778>
@ 1999-01-06 17:21 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 1999-01-06 17:21 UTC (permalink / raw
  To: tas, linuxppc-dev, Paul.Mackerras


I tested on the iMac, and we have also the same register with the same
value. All three machines have the compatible property of the ide in the
device tree set to "heathrow-ata". I'm building a test kernel along with
other patches I made with a quick hack for this, I'll post it soon with
diffs so people can play with it and do real testings.


-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-06 16:02 ` Great IDE perf (WAS: Strange PMAC IDE performance) Benjamin Herrenschmidt
@ 1999-01-07 11:12   ` Timothy A. Seufert
  1999-01-07 11:32     ` Paul Mackerras
  1999-01-07 11:59     ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 10+ messages in thread
From: Timothy A. Seufert @ 1999-01-07 11:12 UTC (permalink / raw
  To: Benjamin Herrenschmidt, linuxppc-dev, Paul.Mackerras


At 5:02 PM +0100 1/6/99, Benjamin Herrenschmidt wrote:
>On Wed, Jan 6, 1999, Paul Mackerras <paulus@cs.anu.edu.au> wrote:
>
>>I found a register at 0xf3020200 on my powermac G3 which affects the
>>speed of disk transfers.  This is at offset 0x200 from the base
>>address of the IDE interface and it is a 32-bit little-endian
>>register.  After booting Linux, it has 0x2f8526 in it, but under MacOS
>>it has 0x211025.  Putting 0x211025 in (with xmon) increased the speed
>>reported by hdparm -tT /dev/hda from 1.89MB/s to 9.7MB/s !  The disk
>>is a WDC 24300ACL (as reported by hdparm -i /dev/hda).  The other
>>hdparm settings were -d1 -u1 -m16.
>
>I tried the manipulation with xmon on my wallstreet PowerBook, using
>today's vger 2.2-pre4 and hdparam test jumped from 1.88Mb/s to 6.3MB/s
>!!! (At first, I forgot to flush the caches, so I got 50Mb/s ;-)

Good one, Paul!

This works on the PowerBook 2400 as well.  It so happens that the IDE
controllers also sit at 0xf3020000 and 0xf3021000 on the O'Hare.  The value
of the register at offset 0x200 is slightly different under MacOS:
0x221025.  I tried both values, it didn't seem to make a difference.  I did
a quick hack to ide-pmac.c (it just stuffs the value in, no questions
asked, though it does actually use the correct base address instead of hard
coding 0xf3020000) and that worked.  Performance is up to 5.6 MB/s (was in
the region of 1.6 before).

Right now my cheap hack is using 0x221025, but if somebody wants I will do
0x211025 instead for an extended period to see if there are any problems.

Any guesses about the meaning of this register?  It feels wrong somehow to
just ape MacOS without knowing what's really going on.  :)

  Tim Seufert

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-07 11:12   ` Timothy A. Seufert
@ 1999-01-07 11:32     ` Paul Mackerras
  1999-01-07 18:59       ` Timothy A. Seufert
  1999-01-07 11:59     ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Mackerras @ 1999-01-07 11:32 UTC (permalink / raw
  To: tas; +Cc: linuxppc-dev


Tim Seufert <tas@mindspring.com> wrote:

> This works on the PowerBook 2400 as well.  It so happens that the IDE
> controllers also sit at 0xf3020000 and 0xf3021000 on the O'Hare.  The value
> of the register at offset 0x200 is slightly different under MacOS:
> 0x221025.  I tried both values, it didn't seem to make a difference.  I did
> a quick hack to ide-pmac.c (it just stuffs the value in, no questions
> asked, though it does actually use the correct base address instead of hard
> coding 0xf3020000) and that worked.  Performance is up to 5.6 MB/s (was in
> the region of 1.6 before).
> 
> Right now my cheap hack is using 0x221025, but if somebody wants I will do
> 0x211025 instead for an extended period to see if there are any problems.

The hack also works on my powerbook 3400, but I only get 4.3MB/s.  On
the iMac I get 10.53MB/s with 211025, but only 8.47MB/s with 221025.

I did some fiddling around, testing the speed with different values in
the register, and I think it is something like this:

- the 3ff000 bits control the speed of dma accesses, the 000fff bits
  control the speed of PIO accesses
- I think the 3f0000 and 00f000 bits control different aspects of dma
  access speed
- the c00, 300 and ff bitfields seem to control different aspects of
  PIO timing.  I think there are bitfields inside of the ff bitfield,
  but I haven't worked out exactly what's going on.  Time for a CRO
  maybe :-)

I think probably any modern drive would be OK with 211025.  Ideally we
would work out exactly how the values relate to the PIO and DMA modes
defined in the ATA-2 spec, then implement the code for selecting
PIO/DMA modes in the ide-pmac driver as requested by the higher level
IDE driver (based on the capabilities reported by the disk).

> Any guesses about the meaning of this register?  It feels wrong somehow to
> just ape MacOS without knowing what's really going on.  :)

It's nice to know what's really going on, but we have managed without
it more-or-less in several other places (e.g. the swim3 floppy
driver).

Paul.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-07 11:12   ` Timothy A. Seufert
  1999-01-07 11:32     ` Paul Mackerras
@ 1999-01-07 11:59     ` Benjamin Herrenschmidt
  1999-01-07 18:59       ` Timothy A. Seufert
  1999-01-08  2:06       ` Paul Mackerras
  1 sibling, 2 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 1999-01-07 11:59 UTC (permalink / raw
  To: Paul.Mackerras, linuxppc-dev, Timothy A. Seufert


On Thu, Jan 7, 1999, Timothy A. Seufert <tas@mindspring.com> wrote:

>This works on the PowerBook 2400 as well.  It so happens that the IDE
>controllers also sit at 0xf3020000 and 0xf3021000 on the O'Hare.  The value
>of the register at offset 0x200 is slightly different under MacOS:
>0x221025.  I tried both values, it didn't seem to make a difference.  I did
>a quick hack to ide-pmac.c (it just stuffs the value in, no questions
>asked, though it does actually use the correct base address instead of hard
>coding 0xf3020000) and that worked.  Performance is up to 5.6 MB/s (was in
>the region of 1.6 before).

Great ! I also included this initialisation in my latest set of patch and
test kernel but currently, I test against "heathrow-ata" in the
compatible property, so it won't do it on your machine. Could you tell me
the value of the compatible property of the ATA on the 2400 ? I'll add
similar code with 0x221025 for OHare and 0x211025 for heathrow, just to
be safe.

>Any guesses about the meaning of this register?  It feels wrong somehow to
>just ape MacOS without knowing what's really going on.  :)

Good question ;-) I'm wondering if this could configure the timing of the
DMA engine on the data port. I tried with my CD-ROM and it works too (I
didn't hdparm it but at least, the CD mounts weel and I didn't see any
problem). It would be great to test with really slow devices however (my
CD is a very fast one).

Another question about IDE: Does someone have any info about IDE ZIP
drives ? I received a mail from someone which is having all sorts of
trouble with a ZIP in the expansion bay. Looks like the beast is not
correctly answering ATAPI commands sent by the driver (yeah, ATAPI, I
thought a ZIP would be plain IDE or floppy-IDE but apparently, his drive
is recognized as an ATAPI one).

-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-07 11:32     ` Paul Mackerras
@ 1999-01-07 18:59       ` Timothy A. Seufert
  0 siblings, 0 replies; 10+ messages in thread
From: Timothy A. Seufert @ 1999-01-07 18:59 UTC (permalink / raw
  To: Paul.Mackerras; +Cc: linuxppc-dev


At 10:32 PM +1100 1/7/99, Paul Mackerras wrote:
>Tim Seufert <tas@mindspring.com> wrote:

>> Performance is up to 5.6 MB/s (was in
>> the region of 1.6 before).

>The hack also works on my powerbook 3400, but I only get 4.3MB/s.  On
>the iMac I get 10.53MB/s with 211025, but only 8.47MB/s with 221025.

If you have the std. factory drive in the 3400, that might explain it.  I
replaced the original 1.3 GB drive in my 2400 with a much newer IBM 4.0 GB
model.

Sometimes, I get 6.3 MB/s instead of 5.6.  Kind of weird.

  Tim Seufert

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-07 11:59     ` Benjamin Herrenschmidt
@ 1999-01-07 18:59       ` Timothy A. Seufert
  1999-01-07 20:15         ` Benjamin Herrenschmidt
  1999-01-08  2:06       ` Paul Mackerras
  1 sibling, 1 reply; 10+ messages in thread
From: Timothy A. Seufert @ 1999-01-07 18:59 UTC (permalink / raw
  To: Benjamin Herrenschmidt, Paul.Mackerras, linuxppc-dev


At 12:59 PM +0100 1/7/99, Benjamin Herrenschmidt wrote:

>Great ! I also included this initialisation in my latest set of patch and
>test kernel but currently, I test against "heathrow-ata" in the
>compatible property, so it won't do it on your machine. Could you tell me
>the value of the compatible property of the ATA on the 2400 ? I'll add
>similar code with 0x221025 for OHare and 0x211025 for heathrow, just to
>be safe.

It's "ohare-ata".  Should apply to any machine with the O'Hare I/O ASIC
(which includes many (all?) of the desktop 603e PCI machines, not just the
older PCI PowerBooks).

  Tim Seufert

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-07 18:59       ` Timothy A. Seufert
@ 1999-01-07 20:15         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 1999-01-07 20:15 UTC (permalink / raw
  To: linuxppc-dev, Timothy A. Seufert


On Thu, Jan 7, 1999, Timothy A. Seufert <tas@mindspring.com> wrote:

>It's "ohare-ata".  Should apply to any machine with the O'Hare I/O ASIC
>(which includes many (all?) of the desktop 603e PCI machines, not just the
>older PCI PowerBooks).

I'm a little bit afraid of enabling this for older machines blindly. I
think I'll do a patch that looks for a specific config option on the
command line until enough people have tested it. After all, this may put
user's datas at risk.

Until Paul finds a more clear meaning of all this, this option should
allow to test if the values we found in MacOS are fine for all machines.
I could add code to BootX that sends the current MacOS values to linux
but this would really be too hackish, I think.

I'll update my test kernel and patch set later tonight or tomorrow.

-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-07 11:59     ` Benjamin Herrenschmidt
  1999-01-07 18:59       ` Timothy A. Seufert
@ 1999-01-08  2:06       ` Paul Mackerras
  1999-01-08  3:30         ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Mackerras @ 1999-01-08  2:06 UTC (permalink / raw
  To: bh40; +Cc: linuxppc-dev


Benjamin Herrenschmidt <bh40@calva.net> wrote:

> Another question about IDE: Does someone have any info about IDE ZIP
> drives ? I received a mail from someone which is having all sorts of
> trouble with a ZIP in the expansion bay. Looks like the beast is not
> correctly answering ATAPI commands sent by the driver (yeah, ATAPI, I
> thought a ZIP would be plain IDE or floppy-IDE but apparently, his drive
> is recognized as an ATAPI one).

I have an ide zip drive on my desktop G3, which appears as an ATAPI
floppy drive.  It works fine.  So it's going to take some digging to
find out why the expansion bay ZIP doesn't work. :-(

Paul.

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Great IDE perf (WAS: Strange PMAC IDE performance)
  1999-01-08  2:06       ` Paul Mackerras
@ 1999-01-08  3:30         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Herrenschmidt @ 1999-01-08  3:30 UTC (permalink / raw
  To: linuxppc-dev, Paul.Mackerras


On Fri, Jan 8, 1999, Paul Mackerras <paulus@cs.anu.edu.au> wrote:

>I have an ide zip drive on my desktop G3, which appears as an ATAPI
>floppy drive.  It works fine.  So it's going to take some digging to
>find out why the expansion bay ZIP doesn't work. :-(

Apparenlty, his ZIP is beeing recognized as a CDROM device, which is
obviously wrong. I'll dig around in the code and looks if I see something
obvious.


-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>





[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to  Cc linuxppc-dev  if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~1999-01-08  3:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <19990106170222.030778>
1999-01-06 17:21 ` Great IDE perf (WAS: Strange PMAC IDE performance) Benjamin Herrenschmidt
1999-01-06  6:01 Strange PMAC IDE performance problem Paul Mackerras
1999-01-06 16:02 ` Great IDE perf (WAS: Strange PMAC IDE performance) Benjamin Herrenschmidt
1999-01-07 11:12   ` Timothy A. Seufert
1999-01-07 11:32     ` Paul Mackerras
1999-01-07 18:59       ` Timothy A. Seufert
1999-01-07 11:59     ` Benjamin Herrenschmidt
1999-01-07 18:59       ` Timothy A. Seufert
1999-01-07 20:15         ` Benjamin Herrenschmidt
1999-01-08  2:06       ` Paul Mackerras
1999-01-08  3:30         ` Benjamin Herrenschmidt

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.