[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B5482D3.305@s5r6.in-berlin.de>
Date: Mon, 18 Jan 2010 16:48:35 +0100
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Tejun Heo <tj@...nel.org>
CC: torvalds@...ux-foundation.org, mingo@...e.hu, peterz@...radead.org,
awalls@...ix.net, linux-kernel@...r.kernel.org, jeff@...zik.org,
akpm@...ux-foundation.org, jens.axboe@...cle.com,
rusty@...tcorp.com.au, cl@...ux-foundation.org,
dhowells@...hat.com, arjan@...ux.intel.com, avi@...hat.com,
johannes@...solutions.net, andi@...stfloor.org,
Jeff Garzik <jgarzik@...ox.com>
Subject: Re: [PATCH 31/40] libata: take advantage of cmwq and remove concurrency
limitations
Tejun Heo wrote:
[...]
> 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.
Are things like INQUIRY and possibly motor spin-up performed there?
If yes, ...
[...]
> #b is solved by using the default wq instead and achieving exclusion
> via per-port mutex.
[...]
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -727,7 +727,7 @@ void ata_scsi_error(struct Scsi_Host *host)
> if (ap->pflags & ATA_PFLAG_LOADING)
> ap->pflags &= ~ATA_PFLAG_LOADING;
> else if (ap->pflags & ATA_PFLAG_SCSI_HOTPLUG)
> - queue_delayed_work(ata_aux_wq, &ap->hotplug_task, 0);
> + schedule_delayed_work(&ap->hotplug_task, 0);
>
> if (ap->pflags & ATA_PFLAG_RECOVERED)
> ata_port_printk(ap, KERN_INFO, "EH complete\n");
> @@ -2938,7 +2938,7 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
> ehc->i.flags |= ATA_EHI_SETMODE;
>
> /* schedule the scsi_rescan_device() here */
> - queue_work(ata_aux_wq, &(ap->scsi_rescan_task));
> + schedule_work(&(ap->scsi_rescan_task));
> } else if (dev->class == ATA_DEV_UNKNOWN &&
> ehc->tries[dev->devno] &&
> ata_class_enabled(ehc->classes[dev->devno])) {
> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
> index f4ea5a8..08e2ef8 100644
> --- a/drivers/ata/libata-scsi.c
> +++ b/drivers/ata/libata-scsi.c
> @@ -3408,8 +3408,7 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)
> " switching to async\n");
> }
>
> - queue_delayed_work(ata_aux_wq, &ap->hotplug_task,
> - round_jiffies_relative(HZ));
> + schedule_delayed_work(&ap->hotplug_task, round_jiffies_relative(HZ));
> }
>
> /**
[...]
... wouldn't queue_delayed_work(system_long_wq, &ap->hotplug_task, ...);
be more appropriate then?
--
Stefan Richter
-=====-==-=- ---= =--=-
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists