[Alug] Hard Drive performance Part 2

Steve Fosdick fozzy at pelvoux.demon.co.uk
Thu Sep 19 23:39:02 BST 2002

On Thu, 19 Sep 2002 23:02:31 +0100
Ian Bell <ian at redtommo.com> wrote:

> I have made a clean install of RH7.3 on the same system.  Base performance is 
> identical.  Removing unnecessary daemons and upgrading kernel improves boot 
> time by a few seconds and eliminates excessive memory usage (caused by a cron 
> job) but makes no difference to program loading times and base disk asccess 
> speed of 3MB/sec.  However hdparn -d1 /dev/hda1 now does not work and returns 
> an error of HDIO_SET_DMA failed.  Operation not permitted.  Man is silent on 
> this.  Anyone know what it means?

The error message "Operation not permitted" corresponds to an error code for which the C macro EPERM is defined, so I grepped the ide driver for EPERM and  found the following function which looks relevant:

static int set_using_dma (ide_drive_t *drive, int arg)
        if (!drive->driver || !DRIVER(drive)->supports_dma)
                return -EPERM;
        if (!drive->id || !(drive->id->capability & 1) || !HWIF(drive)->dmaproc)                return -EPERM;
        if (HWIF(drive)->dmaproc(arg ? ide_dma_on : ide_dma_off, drive))
                return -EIO;
        return 0;

Looking at that it would appear that reason is any of the following:

  *  The drive has no driver assciated with it.

  *  The driver associated with this drive doesn't know how to handle DMA.

  *  The drive capabilty information is missing.

  *  The drive appears not to support DMA.

  *  The IDE interface doesn't have method to set DMA.

The most likely of these if probably that the drive capability info says the drive doesn't support DMA so the next thing would be to find out where the IDE driver gets that from, whether it is from the drive itself or from the BIOS.


More information about the main mailing list