Message ID | 1326443147-26645-1-git-send-email-qiang.liu@freescale.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
On Fri, Jan 13, 2012 at 4:25 PM, Qiang Liu <qiang.liu@freescale.com> wrote: > From: Qiang Liu <b32616@freescale.com> > > Reduce interrupt singnals through reset Interrupt Coalescing Control Reg. > Increase the threshold value of interrupt and timer will reduce the number > of complete interrupt sharply. Improve the system performance effectively. There is always a trade off of throughput and latency by using interrupt coalescing. It's not reasonable to assume that the throughput is the only factor to be considered and set the coalescing threshold and timeout to the max value by default. Have you carried out other benchmark like copying many small files? It will be safer to make the coalescing runtime configurable like the sata_mv driver, IMO. - Leo -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 01/13/2012 04:57 AM, Liu Qiang-B32616 wrote: > No, I didn't test small file. I think this won't affect system load. I can have a test > and describe the result in next patch. Please do... -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 3547000..93f8b00 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -6,7 +6,7 @@ * Author: Ashish Kalra <ashish.kalra@freescale.com> * Li Yang <leoli@freescale.com> * - * Copyright (c) 2006-2007, 2011 Freescale Semiconductor, Inc. + * Copyright (c) 2006-2007, 2011-2012 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -162,6 +162,16 @@ enum { }; /* + * Interrupt Coalescing Control Register bitdefs + */ +enum { + ICC_MIN_INT_THRESHOLD_COUNT = (1 << 24), + ICC_MAX_INT_THRESHOLD_COUNT = (((1 << 4) - 1) << 24), + ICC_MIN_INT_THRESHOLD_TIMER = 1, + ICC_MAX_INT_THRESHOLD_TIMER = ((1 << 18) - 1), +}; + +/* * SATA Superset Registers */ enum { @@ -460,6 +470,13 @@ static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc) /* Simply queue command to the controller/device */ iowrite32(1 << tag, CQ + hcr_base); + /* + * reset the number of command complete bits which will cause the + * interrupt to be signaled + */ + iowrite32(ICC_MAX_INT_THRESHOLD_COUNT | ICC_MAX_INT_THRESHOLD_TIMER, + ICC + hcr_base); + VPRINTK("xx_qc_issue called, tag=%d, CQ=0x%x, CA=0x%x\n", tag, ioread32(CQ + hcr_base), ioread32(CA + hcr_base));