[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hdparm and DMA



[I'm responding to several cut-n-pastes from different letters,
 if it's bad behavior flame me (one time is enough though)
 or read the original posts, then it should make sense.        ]

mdevin wrote:
> 
> On Mon, Nov 18, 2002 at 16:16:57 +0100, Emil Pedersen wrote:
> > > So are the read times as expected for an IDE ATA133, 7200RPM, 40GB drive?
> >
> > Certainly not.  Bellow is what I got from my IBM 7200 rpm disk, (using
> > UDMA66):
> >
> I only just got this computer and hard drive 1 week ago and it is
> supposed to be quite reasonable.

Then you got warranty, backup the data and abuse hdparm options;-)

No, seriously.  Something is really wrong, I think you should get it
fixed before whatever's causing the problem starts corrupting your data
anyway.


> Then checking in syslog I see:
> Nov 19: hda: timeout waiting for DMA
> Nov 19: ide_dmaproc: chipset supported ide_dma_timeout func only: 14
> Nov 19: hda: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> Nov 19: hda: drive not ready for command
> Nov 19: hda: status timeout: status=0xd0 { Busy }
> Nov 19: hda: drive not ready for command
> Nov 19: ide0: reset: success

There you go, the "ide0: reset" sets your controller to PIO mode
(because it's safer? I think).  Then you got the lousy performance.


[...]

> hdparm -c1 -m16 -d1 -X34 -X12 -X69 -a8 /dev/hda

You should not need to fiddle with the -X<##> option, I think.  I also
think you try to set it to several modes at the same time, resulting in
only the last specified.


> But then syslog shows:
> Nov 19: ide0: Speed warnings UDMA 3/4/5 is not functional.


[and from the next letter]

> Actually, some more digging shows some new support in the 2.5 kernel for
> the VIA VT8235 chipset which is on my mobo.  It seems that udma6 can
> then be enabled by passing 'ide0=ata66' to the kernel at boot time.

Does udma66 mode work (not giving you errors in the syslog)?  Then you
at least got a useful mode, although not the theoretical max (which you
won't reach with one drive anyway).  I would stick with it until 2.5.z
becomes 2.6.x.


[and a new one]

 > My other computer is older and its motherboard doesn't have support
for
> ATA133 (80pin cable), but I guess it would just be treated as ATA100.  I

Supposedly only ATA66, higher modes require the new 80 wire cables.


[and a new]

> > So it seems that the drive gets reset for some reason.
> 
> IIRC, this tends to happen when DMA is not fully supported for the
> drive's controller.

Or (as above indicate) not supported modes, or bad cables, or most other
faulty hardware.  (At least I've been told so, I've never been able to
verify the fault when I got the resets.)


[and the last one]

> I think I will stop for now and maybe look into getting another hard
> disk first.  I really don't want to get burnt and lose my data and I can
> deal with the relatively pathetic performance.

Since this is the last mail, I guess the udma66-mode mentioned in a
former mail didn't work?  This might be on time that actually the -X
-options could be useful.  Try one mode at a time and stop at the last
that don't reset the channel (ide0).
  I tried just know, it seems that you want at least 34:

emilp@emil:home/emilp> sudo hdparm -X 65 /dev/hda
/dev/hda:
 setting xfermode to 65 (UltraDMA mode1)
emilp@emil:home/emilp> sudo hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads:   128 MB in  0.81 seconds =158.02 MB/sec
 Timing buffered disk reads:  64 MB in  3.47 seconds = 18.44 MB/sec

emilp@emil:home/emilp> sudo hdparm -X 34 /dev/hda
/dev/hda:
 setting xfermode to 34 (multiword DMA mode2)
emilp@emil:home/emilp> sudo hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads:   128 MB in  0.81 seconds =158.02 MB/sec
 Timing buffered disk reads:  64 MB in  4.20 seconds = 15.24 MB/sec

emilp@emil:home/emilp> sudo hdparm -X 33 /dev/hda
/dev/hda:
 setting xfermode to 33 (multiword DMA mode1)
emilp@emil:home/emilp> sudo hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads:   128 MB in  0.84 seconds =152.38 MB/sec
 Timing buffered disk reads:  64 MB in  5.19 seconds = 12.33 MB/sec

emilp@emil:home/emilp> sudo hdparm -X 32 /dev/hda
/dev/hda:
 setting xfermode to 32 (multiword DMA mode0)
emilp@emil:home/emilp> sudo hdparm -Tt /dev/hda
/dev/hda:
 Timing buffer-cache reads:   128 MB in  0.81 seconds =158.02 MB/sec
 Timing buffered disk reads:  64 MB in 16.25 seconds =  3.94 MB/sec


If nothing else work, the 2.5.x kernel might be worth a try after all.

Sincerely,
	Emil



Reply to: