* [parisc-linux] C3000 and IDE DMA support
@ 2003-08-26 11:46 M. Grabert
2003-08-26 14:52 ` Randolph Chung
2003-08-27 16:30 ` Alan Cox
0 siblings, 2 replies; 9+ messages in thread
From: M. Grabert @ 2003-08-26 11:46 UTC (permalink / raw)
To: parisc-linux
Hi all,
I win a as experimenting mood so I put in a Seagate ST3120022A (120GB, UDMA)
into my C3000 (no floppy, no CDROM). I use the original cable that came with
the C3k (intended for the CDROM), since I sincerely doubt that the IDE
chipset supports UDMA anyway. I just have one ext3 partition on it (111GB).
I have the following problems:
- the hard disk performs very bad (just 3.13 MB/s instead of expected
>30 MB/s, tested with similar drive in PC and same hdparm settings)
In fact it shows typical data rates for unsupported DMA transfers
- excessive harddisk access, ie. copying large files (>1GB) obviously
blocks any other access to the harddisk, at least it's not (very) responsive
(caused by the slow transfer rate?)
- can't change from my default kernel setting (DMA) to PIO mode via hdparm,
it causes a kernel oops (but hey, who needs PIO anyway ;)
Apart from the slowlyness of the drive it works quite well.
my .config contains:
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_NS87415=y
CONFIG_IDEDMA_AUTO=y
CONFIG_BLK_DEV_IDE_MODES=y
I enable IDE DMA for hda as follows:
> hdparm -c 1 -d 1 -u 1 /dev/hda
dmesg shows:
============
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
NS87415: IDE controller at PCI slot 00:0e.0
NS87415: chipset revision 3
NS87415: not 100%% native mode: will probe irqs later
ide0: BM-DMA at 0x0a00-0x0a07, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x0a08-0x0a0f, BIOS settings: hdc:pio, hdd:pio
hda: ST3120022A, ATA DISK drive
blk: queue 103c1608, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 103
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=14593/255/63, (U)DMA
Partition check:
hda: hda1
Is unmasq_irq supported? What about DMA? Is it obviously not fixed yet
(at least somebody wrote that "ns87415 dma doesn't work reliably on
suckyio-systems" a couple of weeks back)
Any hints how to speed up the transfer rate?
Thanks,
Max
PS: I have problems with Samba-2.2.3 and 3.0.0 when transferring
multiple 1GB files from an XP box to the samba share (the IDE harddisk):
samba disconnects after transferring 2x 1GB files, but will copy many
smaller files (several MB) just fine (although combined >>2GB).
It might be the case that the IDE hard disk is too slow (3MB/s) for my
100Mbit FDX ethernet (4-5MB/s) and thus confuses samba ...
Samba-3.0.0 also seems to be a little bit "laggy" when I try to access a
share (or any of it's files); there is always a delay for about 1-2s for
each read access to a file ... but it's a beta version anyway and this
issue should be better discussed on lists.debian.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-26 11:46 [parisc-linux] C3000 and IDE DMA support M. Grabert
@ 2003-08-26 14:52 ` Randolph Chung
2003-08-27 16:30 ` Alan Cox
1 sibling, 0 replies; 9+ messages in thread
From: Randolph Chung @ 2003-08-26 14:52 UTC (permalink / raw)
To: M. Grabert; +Cc: parisc-linux
> - the hard disk performs very bad (just 3.13 MB/s instead of expected
> >30 MB/s, tested with similar drive in PC and same hdparm settings)
> In fact it shows typical data rates for unsupported DMA transfers
You are right, DMA is not yet supported on superio... at some point it
was sort of working, but not very reliably...
it's a worthwhile project if you want to do some kernel hacking :-)
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-26 11:46 [parisc-linux] C3000 and IDE DMA support M. Grabert
2003-08-26 14:52 ` Randolph Chung
@ 2003-08-27 16:30 ` Alan Cox
2003-08-27 17:36 ` M. Grabert
1 sibling, 1 reply; 9+ messages in thread
From: Alan Cox @ 2003-08-27 16:30 UTC (permalink / raw)
To: M. Grabert; +Cc: parisc-linux
On Maw, 2003-08-26 at 12:46, M. Grabert wrote:
> - the hard disk performs very bad (just 3.13 MB/s instead of expected
> >30 MB/s, tested with similar drive in PC and same hdparm settings)
> In fact it shows typical data rates for unsupported DMA transfers
Your drive is in PIO, probably PIO3 or so.
> - excessive harddisk access, ie. copying large files (>1GB) obviously
> blocks any other access to the harddisk, at least it's not (very) responsive
> (caused by the slow transfer rate?)
Hard to tell
> - can't change from my default kernel setting (DMA) to PIO mode via hdparm,
> it causes a kernel oops (but hey, who needs PIO anyway ;)
That would be a bug
> Is unmasq_irq supported? What about DMA? Is it obviously not fixed yet
> (at least somebody wrote that "ns87415 dma doesn't work reliably on
> suckyio-systems" a couple of weeks back)
irq unmasking is a generic IDE property so should be fine on any
platform with a non prehistoric defunct controller (NS87415 is fine)
> Any hints how to speed up the transfer rate?
Buy a PC ;)
Basically you need to fix DMA support
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-27 16:30 ` Alan Cox
@ 2003-08-27 17:36 ` M. Grabert
2003-08-27 21:23 ` Alan Cox
0 siblings, 1 reply; 9+ messages in thread
From: M. Grabert @ 2003-08-27 17:36 UTC (permalink / raw)
To: Alan Cox; +Cc: parisc-linux
On 27 Aug 2003, Alan Cox wrote:
> On Maw, 2003-08-26 at 12:46, M. Grabert wrote:
> > - the hard disk performs very bad (just 3.13 MB/s instead of expected
> > >30 MB/s, tested with similar drive in PC and same hdparm settings)
> > In fact it shows typical data rates for unsupported DMA transfers
>
> Your drive is in PIO, probably PIO3 or so.
beast:/home/xam# hdparm -i /dev/hda
/dev/hda:
Model=ST3120022A, FwRev=3.06, SerialNo=5JT04M42
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=4228907259, LBA=yes, LBAsects=234441648
IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 *mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: ATA/ATAPI-6 T13 1410D revision 2: 1 2 3 4 5 6
Mhh, also "hdparm -d" shows that the "DMA mode" of the hard disk is
"enabled", but I really have the feeling it isn't.
[...]
> > Is unmasq_irq supported? What about DMA? Is it obviously not fixed yet
> > (at least somebody wrote that "ns87415 dma doesn't work reliably on
> > suckyio-systems" a couple of weeks back)
>
> irq unmasking is a generic IDE property so should be fine on any
> platform with a non prehistoric defunct controller (NS87415 is fine)
>
> > Any hints how to speed up the transfer rate?
>
> Buy a PC ;)
Close ;)
Bought a IDE controller (Silicon Image Sil680) for EUR 15 ...
Hope it works, since I need a quick solution because this machine is used
as a WLAN Bridge/DNS cache/DHCP server/DSL router/Fire server in our house.
> Basically you need to fix DMA support
If I have/had time besides my PhD ... moreover I still have to little
knowledge about IDE stuff and kernel hacking to help.
I think you know the feeling since you're taking a sabbatical to do a MBA ;)
I'm just good at AI stuff (PhD) and parallel computing (former job & hobby).
Anyway, I try to help by testing and experimenting with new kernels
and telling what obvious mistakes I found and what's not running.
I.e. I don't intend to complain but help with what I report.
So far I'm quite happy with the stability of Linux/PA-RISC, so I've
really no reason to complain (rather the opposite: thank you!).
Slan,
Max
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-27 17:36 ` M. Grabert
@ 2003-08-27 21:23 ` Alan Cox
2003-08-27 21:44 ` Grant Grundler
0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2003-08-27 21:23 UTC (permalink / raw)
To: M. Grabert; +Cc: parisc-linux
On Mer, 2003-08-27 at 18:36, M. Grabert wrote:
> beast:/home/xam# hdparm -i /dev/hda
> DMA modes: mdma0 mdma1 *mdma2
So its tuned for DMA2 (doesn't mean its not using PIO..)
> Mhh, also "hdparm -d" shows that the "DMA mode" of the hard disk is
> "enabled", but I really have the feeling it isn't.
The crash is also curious - I wonder if parisc is either bouncing
every DMA buffer and copying it for some reason, or its failing DMA
by a path other platforms don't hit which isnt cleaning up right.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-27 21:23 ` Alan Cox
@ 2003-08-27 21:44 ` Grant Grundler
2003-08-27 22:22 ` Alan Cox
0 siblings, 1 reply; 9+ messages in thread
From: Grant Grundler @ 2003-08-27 21:44 UTC (permalink / raw)
To: Alan Cox; +Cc: M. Grabert, parisc-linux
On Wed, Aug 27, 2003 at 10:23:17PM +0100, Alan Cox wrote:
> The crash is also curious - I wonder if parisc is either bouncing
> every DMA buffer and copying it for some reason,
c3000 uses sba_iommu.c and AFAIK all DMA goes through the IOMMU.
Would surprise me if the DMA was bounced/copied.
grant
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-27 21:44 ` Grant Grundler
@ 2003-08-27 22:22 ` Alan Cox
2003-08-27 23:09 ` Grant Grundler
0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2003-08-27 22:22 UTC (permalink / raw)
To: Grant Grundler; +Cc: M. Grabert, parisc-linux
On Mer, 2003-08-27 at 22:44, Grant Grundler wrote:
> c3000 uses sba_iommu.c and AFAIK all DMA goes through the IOMMU.
> Would surprise me if the DMA was bounced/copied.
Nod.. I'm trying to fathom the 3Mbyte/second behaviour while hdparm
claims DMA is on
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-27 22:22 ` Alan Cox
@ 2003-08-27 23:09 ` Grant Grundler
2003-08-27 23:19 ` M. Grabert
0 siblings, 1 reply; 9+ messages in thread
From: Grant Grundler @ 2003-08-27 23:09 UTC (permalink / raw)
To: Alan Cox; +Cc: M. Grabert, parisc-linux
On Wed, Aug 27, 2003 at 11:22:54PM +0100, Alan Cox wrote:
> Nod.. I'm trying to fathom the 3Mbyte/second behaviour while hdparm
> claims DMA is on
I thought each PIO READ costs something like 400 or 500 cycles on c3k
(400Mhz CPU). 400/3 == 133 cycles/byte.
Either doing very slow DMA or 32-bit (4*133 == 532) reads.
Then it would make sense.
grant
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [parisc-linux] C3000 and IDE DMA support
2003-08-27 23:09 ` Grant Grundler
@ 2003-08-27 23:19 ` M. Grabert
0 siblings, 0 replies; 9+ messages in thread
From: M. Grabert @ 2003-08-27 23:19 UTC (permalink / raw)
To: Grant Grundler; +Cc: Alan Cox, parisc-linux
On Wed, 27 Aug 2003, Grant Grundler wrote:
> On Wed, Aug 27, 2003 at 11:22:54PM +0100, Alan Cox wrote:
> > Nod.. I'm trying to fathom the 3Mbyte/second behaviour while hdparm
> > claims DMA is on
>
> I thought each PIO READ costs something like 400 or 500 cycles on c3k
> (400Mhz CPU). 400/3 == 133 cycles/byte.
>
> Either doing very slow DMA or 32-bit (4*133 == 532) reads.
> Then it would make sense.
beast:/home/xam# hdparm -c /dev/hda
/dev/hda:
IO_support = 1 (32-bit)
Well, I set it to 32bit I/O, more specifically I also tried
c=0 (16bit, default), c=3 (32-bit with sync). Everytime the same:
beast:/home/xam# hdparm -Tt /dev/hda
/dev/hda:
Timing buffer-cache reads: 128 MB in 1.80 seconds = 71.11 MB/sec
Timing buffered disk reads: 64 MB in 20.48 seconds = 3.12 MB/sec
However switching of DMA (as I told in my previous post, 'hdparm -d 0')
will cause a kernel crash (+ dump).
I haven't tried to compile & test a kernel without DMA support (or NS87415
support)
greetings, Max
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-08-27 23:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-26 11:46 [parisc-linux] C3000 and IDE DMA support M. Grabert
2003-08-26 14:52 ` Randolph Chung
2003-08-27 16:30 ` Alan Cox
2003-08-27 17:36 ` M. Grabert
2003-08-27 21:23 ` Alan Cox
2003-08-27 21:44 ` Grant Grundler
2003-08-27 22:22 ` Alan Cox
2003-08-27 23:09 ` Grant Grundler
2003-08-27 23:19 ` M. Grabert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox