aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-07-02 04:03:52 -0400
committerTejun Heo <tj@kernel.org>2010-07-02 04:59:24 -0400
commitad72cf9885c536e3adae03f8337557ac9dd1e4bb (patch)
treee93af7f241987ffe365792c0130d182b0ac890d1 /drivers/ata/libata-eh.c
parentd313dd85ad846bc768d58e9ceb28588f917f4c9a (diff)
libata: take advantage of cmwq and remove concurrency limitations
libata has two concurrency related limitations. a. ata_wq which is used for polling PIO has single thread per CPU. If there are multiple devices doing polling PIO on the same CPU, they can't be executed simultaneously. b. ata_aux_wq which is used for SCSI probing has single thread. In cases where SCSI probing is stalled for extended period of time which is possible for ATAPI devices, this will stall all probing. #a is solved by increasing maximum concurrency of ata_wq. Please note that polling PIO might be used under allocation path and thus needs to be served by a separate wq with a rescuer. #b is solved by using the default wq instead and achieving exclusion via per-port mutex. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f77a67303f8b..4d2af824dd23 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -727,7 +727,7 @@ void ata_scsi_error(struct Scsi_Host *host)
727 if (ap->pflags & ATA_PFLAG_LOADING) 727 if (ap->pflags & ATA_PFLAG_LOADING)
728 ap->pflags &= ~ATA_PFLAG_LOADING; 728 ap->pflags &= ~ATA_PFLAG_LOADING;
729 else if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG) 729 else if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG)
730 queue_delayed_work(ata_aux_wq, &ap->hotplug_task, 0); 730 schedule_delayed_work(&ap->hotplug_task, 0);
731 731
732 if (ap->pflags & ATA_PFLAG_RECOVERED) 732 if (ap->pflags & ATA_PFLAG_RECOVERED)
733 ata_port_printk(ap, KERN_INFO, "EH complete\n"); 733 ata_port_printk(ap, KERN_INFO, "EH complete\n");
@@ -2944,7 +2944,7 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
2944 ehc->i.flags |= ATA_EHI_SETMODE; 2944 ehc->i.flags |= ATA_EHI_SETMODE;
2945 2945
2946 /* schedule the scsi_rescan_device() here */ 2946 /* schedule the scsi_rescan_device() here */
2947 queue_work(ata_aux_wq, &(ap->scsi_rescan_task)); 2947 schedule_work(&(ap->scsi_rescan_task));
2948 } else if (dev->class == ATA_DEV_UNKNOWN && 2948 } else if (dev->class == ATA_DEV_UNKNOWN &&
2949 ehc->tries[dev->devno] && 2949 ehc->tries[dev->devno] &&
2950 ata_class_enabled(ehc->classes[dev->devno])) { 2950 ata_class_enabled(ehc->classes[dev->devno])) {