Re: [PATCH #upstream-fixes] sata_mv: don't issue two DMA commands concurrently

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

 



What happen if there is a SATA port multiplier behing the marvell
controller and NCQ is disabled?

I have the impression that with this patch we are able to only send
one DMA command at a time to all the drives behind the PM, which has
an impact on performance.

Gwendal.

On Wed, Aug 13, 2008 at 4:24 AM, Tejun Heo <htejun@xxxxxxxxx> wrote:
> sata_mv allowed issuing two DMA commands concurrently which the
> hardware allows.  Unfortunately, libata core layer isn't ready for
> this yet and spews ugly warning message and malfunctions on this.
> Don't allow concurrent DMA commands for now.
>
> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> ---
> No problem, Artem.
>
> Mark, does this look good to you?
>
>  drivers/ata/sata_mv.c |   34 ++++++++++------------------------
>  1 file changed, 10 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index ad169ff..80c655f 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -1134,30 +1134,16 @@ static int mv_qc_defer(struct ata_queued_cmd *qc)
>        if (ap->nr_active_links == 0)
>                return 0;
>
> -       if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) {
> -               /*
> -                * The port is operating in host queuing mode (EDMA).
> -                * It can accomodate a new qc if the qc protocol
> -                * is compatible with the current host queue mode.
> -                */
> -               if (pp->pp_flags & MV_PP_FLAG_NCQ_EN) {
> -                       /*
> -                        * The host queue (EDMA) is in NCQ mode.
> -                        * If the new qc is also an NCQ command,
> -                        * then allow the new qc.
> -                        */
> -                       if (qc->tf.protocol == ATA_PROT_NCQ)
> -                               return 0;
> -               } else {
> -                       /*
> -                        * The host queue (EDMA) is in non-NCQ, DMA mode.
> -                        * If the new qc is also a non-NCQ, DMA command,
> -                        * then allow the new qc.
> -                        */
> -                       if (qc->tf.protocol == ATA_PROT_DMA)
> -                               return 0;
> -               }
> -       }
> +       /*
> +        * The port is operating in host queuing mode (EDMA) with NCQ
> +        * enabled, allow multiple NCQ commands.  EDMA also allows
> +        * queueing multiple DMA commands but libata core currently
> +        * doesn't allow it.
> +        */
> +       if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) &&
> +           (pp->pp_flags & MV_PP_FLAG_NCQ_EN) && ata_is_ncq(qc->tf.protocol))
> +               return 0;
> +
>        return ATA_DEFER_PORT;
>  }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux