ATA Patch #6

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Fri Nov 26 17:22:29 PST 2004


On Fri, Nov 26, 2004 at 12:49:35AM +0900, YONETANI Tomokazu wrote:
> ATA Patch #5:
>   no lock-ups on both machines. read rate on SS3500 dropped to something
>   like 3.6Mbytes/sec. read rate on P4S8X dropped to 5.4Mbytes/sec on the
>   first channel, but the read rate from the second channel didn't seem
>   to be affected. irq's are 14 for the first channel and 15 for the second
>   channel.
> 
> ATA Patch #6:
>   timeout at every read access on SS3500 when the controller is operating
>   at UDMA66 mode. if I downgraded it to UDMA33 or PIO[0-3] and has no problem.
> 
>   on P4S8X, dd from the second drive never reported the progress when
>   I pressed ctrl+T, and eventually locked up in a several seconds.

Ok, I found four things while tweaking the driver
1) talking to myself repeatedly on a public forum makes me look very stupid :)

2) adding DELAY() in ata_command() unconditionally was critical on performance.

3) you removed the conditional from the following code in ata_command()
   and made it always control interrupt from the device:
  /* disable interrupt from device */
  if (atadev->channel->flags & ATA_QUEUED)
      ATA_OUTB(atadev->channel->r_altio, ATA_ALTSTAT, ATA_A_IDS | ATA_A_4BIT);

   but it led to timeout or lock-up on two of my DragonFly machines.
   if I put the conditional back in, the timeout won't happen.

4) in ata_command(), calls to crit_enter() and crit_exit() don't correspond.





More information about the Kernel mailing list