Re: Playing with SATA NCQ

From: Jens Axboe (axboe_at_suse.de)
Date: 05/27/05

  • Next message: Siddha, Suresh B: "Re: [Patch] x86: fix smp_num_siblings on buggy BIOSes"
    Date:	Fri, 27 May 2005 08:28:03 +0200
    To: Mark Lord <liml@rtr.ca>
    
    

    On Thu, May 26 2005, Mark Lord wrote:
    > I also saw a good boost from NCQ on the qstor driver (full version,
    > not the libata subset) last year. Very good for busy servers
    > and RAID arrays.

    It does seem to work amazingly well, from a performance point of view.

    > Jens Axboe wrote:
    > + do {
    > + /*
    > + * we rely on the FIFO order of the exclusive waitqueues
    > + */
    > + prepare_to_wait_exclusive(&ap->cmd_wait_queue, &wait,
    > + TASK_UNINTERRUPTIBLE);
    > +
    > + if (!ata_qc_issue_ok(ap, qc, 1)) {
    > + spin_unlock_irq(&ap->host_set->lock);
    > + schedule();
    > + spin_lock_irq(&ap->host_set->lock);
    > + }
    > +
    > + finish_wait(&ap->cmd_wait_queue, &wait);
    > +
    > + } while (!ata_qc_issue_ok(ap, qc, 1));
    >
    > In this bit (above), is it possible for this code to ever
    > be invoked from a SCHED_RR or SCHED_FIFO context?
    >
    > If so, it will lock out all lower-priority processes
    > for the duration of the polling interval.

    Yeah, I'm not a huge fan of the need for the above code... If every qc
    was tied to a SCSI command, we could just ask for a later requeue of the
    request as is currently done with NCQ commands. Alternatively, we could
    add an internal libata qc queue for postponing these commands. That
    would take a little effort, as the sync errors reported by
    ata_qc_issue() would then be need to signalled async through the
    completion callback instead.

    Jeff, what do you think?

    -- 
    Jens Axboe
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Siddha, Suresh B: "Re: [Patch] x86: fix smp_num_siblings on buggy BIOSes"

    Relevant Pages

    • Re: Playing with SATA NCQ
      ... free to point me at the authoritative wording in the ACHI spec. ... is that you set it unconditionally of whether this was an NCQ ... commands, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: SATA RAID5 speed drop of 100 MB/s
      ... but that the over-all real-life performance ... commands available to be sent to the drive. ... We have seen buggy NCQ firmwares where performance decreases, so it is possible that NCQ just isn't good on your drives. ...
      (Linux-Kernel)
    • Re: [PATCH] blacklist NCQ on Seagate Barracuda ST380817AS
      ... I wonder if libata has a generic problem with NCQ + FLUSH CACHE. ... FPDMA commands and FLUSH commands. ...
      (Linux-Kernel)
    • Re: SATA hotplug from the user side ?
      ... state before issuing any of the sleep, ... libata would need to block its EH from resetting a channel for this check ... management state by snooping all the commands sent to it. ... states that it shouldn't alter the power mode of the device. ...
      (Linux-Kernel)
    • Re: SATA hotplug from the user side ?
      ... state before issuing any of the sleep, head unload and spin-down commands? ... libata would need to block its EH from resetting a channel for this check ... management state by snooping all the commands sent to it. ... process STANDBY IMMEDIATE when it's in Standby state. ...
      (Linux-Kernel)