From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH unfinished update] firewire: sbp2: parallelize login/inquiry, reconnect, and shutdown
Date: Wed, 13 Oct 2010 00:25:13 +0200 (CEST) [thread overview]
Message-ID: <tkrat.b190ad8b687a549a@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.6dd361dadace9a41@s5r6.in-berlin.de>
> So I changed the patch to the simple one below, but suddenly my
> INIC-2430 device has trouble with inquiry in parallel to its two LUNs:
The following modification fixes this mostly, i.e. always when the first
Inquiry attempt to one LUN fails but succeeds on the other. But I had
one occasion just now at which both failed; then that reschedule does
simply lead into the same situation until retry limit.
> Maybe I need ordered per-target workqueues.
No, I actually need per-node ordering. This device, like my other one
and apparently most ones on the market actually keep their SCSI logical
units in separate FireWire units. Currently firewire-sbp2 is not aware
that fw_unit instances reside on the same node.
This is going to be tougher than I hoped. Maybe I need a driver-global
Inquiry mutex. Or move the __scsi_add_device() out of sbp2_login() into
another work which is scheduled to a "single-threaded" workqueue.
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -982,6 +982,8 @@ static void sbp2_login(struct work_struc
* lu->work already. Reset the work from reconnect to login.
*/
PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
+ if (lu->retries++ < 5)
+ sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5));
out:
sbp2_target_put(tgt);
}
@@ -1656,7 +1658,8 @@ MODULE_ALIAS("sbp2");
static int __init sbp2_init(void)
{
- sbp2_wq = create_singlethread_workqueue(KBUILD_MODNAME);
+ sbp2_wq = alloc_workqueue(KBUILD_MODNAME,
+ WQ_NON_REENTRANT | WQ_RESCUER, 0);
if (!sbp2_wq)
return -ENOMEM;
--
Stefan Richter
-=====-==-=- =-=- -==-=
http://arcgraph.de/sr/
next prev parent reply other threads:[~2010-10-12 22:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 14:55 [PATCH] firewire: core: use non-reentrant workqueue where necessary Stefan Richter
2010-10-10 14:57 ` [PATCH] firewire: sbp2: parallelize login/inquiry, reconnect, and shutdown Stefan Richter
2010-10-11 13:43 ` Tejun Heo
2010-10-11 21:27 ` Stefan Richter
2010-10-11 21:39 ` Stefan Richter
2010-10-12 13:55 ` Tejun Heo
2010-10-12 16:15 ` Stefan Richter
2010-10-12 16:46 ` Tejun Heo
2010-10-12 13:50 ` Tejun Heo
2010-10-12 21:39 ` [PATCH unfinished update] " Stefan Richter
2010-10-12 22:25 ` Stefan Richter [this message]
2010-10-12 23:09 ` Stefan Richter
2010-10-13 9:45 ` Tejun Heo
2010-10-11 13:29 ` [PATCH] firewire: core: use non-reentrant workqueue where necessary Tejun Heo
2010-10-11 19:05 ` Stefan Richter
2010-10-12 21:29 ` [PATCH update] firewire: core: use non-reentrant workqueue with rescuer Stefan Richter
2010-10-13 9:47 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tkrat.b190ad8b687a549a@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®