linux/drivers/ata
Dan Williams 8a4aeec8d2 libata/ahci: accommodate tag ordered controllers
The AHCI spec allows implementations to issue commands in tag order
rather than FIFO order:

	5.3.2.12 P:SelectCmd
	HBA sets pSlotLoc = (pSlotLoc + 1) mod (CAP.NCS + 1)
	or HBA selects the command to issue that has had the
	PxCI bit set to '1' longer than any other command
	pending to be issued.

The result is that commands posted sequentially (time-wise) may play out
of sequence when issued by hardware.

This behavior has likely been hidden by drives that arrange for commands
to complete in issue order.  However, it appears recent drives (two from
different vendors that we have found so far) inflict out-of-order
completions as a matter of course.  So, we need to take care to maintain
ordered submission, otherwise we risk triggering a drive to fall out of
sequential-io automation and back to random-io processing, which incurs
large latency and degrades throughput.

This issue was found in simple benchmarks where QD=2 seq-write
performance was 30-50% *greater* than QD=32 seq-write performance.

Tagging for -stable and making the change globally since it has a low
risk-to-reward ratio.  Also, word is that recent versions of an unnamed
OS also does it this way now.  So, drives in the field are already
experienced with this tag ordering scheme.

Cc: <stable@vger.kernel.org>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Ed Ciechanowski <ed.ciechanowski@intel.com>
Reviewed-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2014-04-18 15:56:03 -04:00
..
acard-ahci.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
ahci_da850.c ata: add new-style AHCI platform driver for DaVinci DA850 AHCI controller 2014-03-25 15:17:13 -04:00
ahci_imx.c ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions 2014-03-06 14:31:13 -05:00
ahci_platform.c ata: move library code from ahci_platform.c to libahci_platform.c 2014-03-25 15:17:13 -04:00
ahci_st.c ata: ahci_st: remove deprecated struct ahci_platform_data usage 2014-03-14 14:26:29 -04:00
ahci_sunxi.c ata: ahci_sunxi: fix code formatting 2014-03-17 10:46:54 -04:00
ahci_xgene.c ata: Fix compiler warning with APM X-Gene host controller driver 2014-03-18 16:01:04 -04:00
ahci.c ahci: Do not receive interrupts sent by dummy ports 2014-04-18 15:55:57 -04:00
ahci.h ahci: Ensure "MSI Revert to Single Message" mode is not enforced 2014-04-17 09:58:48 -04:00
ata_generic.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
ata_piix.c ata_piix: minor typo and a printk fix 2013-10-13 16:17:48 -04:00
Kconfig ata: fix i.MX AHCI driver dependencies 2014-04-08 08:31:48 -04:00
libahci_platform.c ata: move library code from ahci_platform.c to libahci_platform.c 2014-03-25 15:17:13 -04:00
libahci.c ata: remove superfluous casts 2014-03-26 12:36:53 -04:00
libata-acpi.c ACPI and power management updates for 3.15-rc1 2014-04-01 12:48:54 -07:00
libata-core.c libata/ahci: accommodate tag ordered controllers 2014-04-18 15:56:03 -04:00
libata-eh.c libata, libsas: kill pm_result and related cleanup 2014-03-18 16:08:38 -04:00
libata-pmp.c ata: enable quirk from jmicron JMB350 for JMB394 2014-01-31 07:05:44 -05:00
libata-scsi.c Merge branch 'for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-01-21 18:16:08 -08:00
libata-sff.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
libata-transport.c libata: Fix display of sata speed 2013-10-27 07:43:25 -04:00
libata-transport.h [libata] Add ATA transport class 2010-10-21 20:21:03 -04:00
libata-zpodd.c libata: zpodd: eliminate odd_can_poweroff 2014-03-14 11:23:47 -04:00
libata.h ATA / ACPI: remove power dependent device handling 2013-10-17 15:38:53 +02:00
Makefile ata: add new-style AHCI platform driver for DaVinci DA850 AHCI controller 2014-03-25 15:17:13 -04:00
pata_acpi.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ali.c ata: use pci_get_drvdata() 2013-06-02 22:22:03 -07:00
pata_amd.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_arasan_cf.c pata_arasan_cf: fix ata_host_activate() failure handling 2014-04-14 13:50:03 -04:00
pata_artop.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_at32.c ata: use dev_get_platdata() 2013-07-30 08:59:24 -04:00
pata_at91.c pata_at91: fix ata_host_activate() failure handling 2014-04-02 13:17:31 -04:00
pata_atiixp.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_atp867x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_bf54x.c ata: use platform_{get,set}_drvdata() 2013-05-24 10:26:13 +09:00
pata_cmd64x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cmd640.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5520.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5530.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5535.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cs5536.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_cypress.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_efar.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ep93xx.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt3x2n.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt3x3.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt37x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_hpt366.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_icside.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_imx.c Merge branch 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-03-31 15:27:37 -07:00
pata_isapnp.c pata_isapnp: Don't use invalid I/O ports 2013-10-07 15:17:32 -04:00
pata_it821x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_it8213.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ixp4xx_cf.c DMA-API: others: use dma_set_coherent_mask() 2013-10-31 14:49:07 +00:00
pata_jmicron.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_legacy.c pata_legacy: Remove dead code 2014-03-11 08:30:53 -04:00
pata_macio.c ata: use pci_get_drvdata() 2013-06-02 22:22:03 -07:00
pata_marvell.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_mpc52xx.c ata: use platform_{get,set}_drvdata() 2013-05-24 10:26:13 +09:00
pata_mpiix.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_netcell.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ninja32.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ns87410.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_ns87415.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_octeon_cf.c DMA-API: ata: pata_octeon_cf: convert to use dma_coerce_mask_and_coherent() 2013-10-31 14:48:49 +00:00
pata_of_platform.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_oldpiix.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_opti.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_optidma.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_palmld.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_pcmcia.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_pdc202xx_old.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_pdc2027x.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_piccolo.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_platform.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_pxa.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_radisys.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_rb532_cf.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_rdc.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_rz1000.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_samsung_cf.c pata_samsung_cf: fix ata_host_activate() failure handling 2014-04-15 08:48:56 -04:00
pata_sc1200.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_scc.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sch.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_serverworks.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sil680.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sis.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_sl82c105.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_triflex.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pata_via.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
pdc_adma.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_dwc_460ex.c ata: remove superfluous casts 2014-03-26 12:36:53 -04:00
sata_fsl.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
sata_highbank.c ata: sata_highbank: remove superfluous cast 2014-03-26 11:42:01 -04:00
sata_inic162x.c libata: make it clear that sata_inic162x is experimental 2013-07-22 17:11:14 -04:00
sata_mv.c Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-02-20 12:04:15 -08:00
sata_nv.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_promise.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_promise.h
sata_qstor.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_rcar.c sata_rcar: Add R-Car Gen2 SATA PHY support 2013-11-29 15:41:17 -05:00
sata_sil24.c ata: use pci_get_drvdata() 2013-06-02 22:22:03 -07:00
sata_sil.c Merge branch 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2014-03-31 15:27:37 -07:00
sata_sis.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_svw.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_sx4.c ata: remove superfluous casts 2014-03-26 12:36:53 -04:00
sata_uli.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_via.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sata_vsc.c ata: delete non-required instances of include <linux/init.h> 2014-02-13 16:40:56 -05:00
sis.h