From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Matthew Wilcox <willy@linux.intel.com>,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
USB Storage List <usb-storage@lists.one-eyed-alien.net>
Subject: Re: Make UAS work on HS for devices with and without command tagging support
Date: Thu, 15 Dec 2011 09:44:37 +0100 [thread overview]
Message-ID: <4EE9B375.4020606@linutronix.de> (raw)
In-Reply-To: <20111214225331.GA5508@xanatos>
On 12/14/2011 11:53 PM, Sarah Sharp wrote:
> Thanks for testing! Are these patches on top of the patches I sent out
> a week ago? Or just on top of Greg's tree?
They are ontop of Greg's tree. I know that you sent a patch to fix the
same issue I did on my #1 patch. I remember that something did not work
out. It might be the thing for which I need #2. So if you want me to
rebase those two or redo something please let me know.
>> To deal with canceled commands (where we may have to kill some status urbs)
>> I've been thinking about a list within uas_dev_info which keeps track of
>> all status urbs and counts all commands which are queued. Once we start
>> removing commands which timed out we should make sure that the number of
>> commands which remain is the same as the number of status urbs which we
>> have. If we have more status urbs than commands then we kill some status
>> urbs. If it is the other way around then someone was too trigger happy.
>
> That might work, but we'd have to synchronize the list manipulations
> across status completions. That would get complex in the USB 3.0 case,
> where we could (potentially, if the xHCI driver had multiple event ring
> support and the host had MSI-X support) have two status completion
> handlers running on different CPUs. One of the completion handlers
> would have to spin, waiting on the other. So if we can avoid a list of
> outstanding URBs, that would be better.
USB3.0. I see. On 3.0 we would have one status urb for each command so
it might end up in the command struct.
> Matthew was just mentioning to me that it might be good to just have one
> status URB per USB 2.0 UAS device, and just keep re-submitting it. USB
> 2.0 devices don't have streams, so there can't be multiple status URBs
> being processed at the same time, so I think it would work. The only
Oh. That sounds great. I've been thinking how to avoid multiple
allocation/allocation of them.
> difficulty I see is syncing the status completion with an abort of the
> same command, but I think that could be done with an RCU reader lock in
> the status completion. There shouldn't be any performance difference
> between re-using one status URB or using a dedicated one in the
> cmnd_info structure. Plus, we wouldn't have to allocate status URBs in
> completion handlers if we just used one dedicated status URB.
yep. Sounds like a plan.
> For USB 3.0 UAS, I think the status URB should stay in the cmnd_info
> structure, since we know that when a status URB completes for a
> particular stream ID, it is directly associated with that command, and
> not a different command. So I'd like to address the sense URB failure
> issue you tried to fix in the second patch, but I think we should go
> about it in a different way.
Fine by me. You want me to redo #2 with one status urb/uas device or do
you do it yourself?
> Sarah Sharp
Sebastian
next prev parent reply other threads:[~2011-12-15 8:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 18:47 Make UAS work on HS for devices with and without command tagging support Sebastian Andrzej Siewior
2011-12-14 18:47 ` [PATCH 1/2] usb/uas: fix support on HS (device without command tagging) Sebastian Andrzej Siewior
[not found] ` <1323888472-21035-2-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-15 11:14 ` Sergei Shtylyov
2011-12-14 18:47 ` [PATCH 2/2] usb/uas: fix support on HS (device with " Sebastian Andrzej Siewior
2011-12-14 22:53 ` Make UAS work on HS for devices with and without command tagging support Sarah Sharp
2011-12-15 8:44 ` Sebastian Andrzej Siewior [this message]
[not found] ` <4EE9B375.4020606-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-15 21:12 ` [usb-storage] " Sarah Sharp
2011-12-16 14:47 ` Sebastian Andrzej Siewior
2011-12-16 20:12 ` Sebastian Andrzej Siewior
2011-12-16 20:31 ` Matthew Wilcox
2011-12-16 20:42 ` Sebastian Andrzej Siewior
2011-12-16 21:36 ` Sarah Sharp
2011-12-16 21:44 ` Alan Stern
2011-12-16 21:47 ` James Bottomley
2011-12-19 16:12 ` Matthew Wilcox
2011-12-19 17:14 ` James Bottomley
2011-12-19 18:36 ` Matthew Wilcox
2011-12-19 20:27 ` James Bottomley
2011-12-19 20:57 ` Matthew Wilcox
2011-12-19 21:22 ` James Bottomley
2011-12-19 16:14 ` [PATCH] usb/uas: use unique tags for all LUNs Sebastian Andrzej Siewior
2011-12-19 19:39 ` [PATCH] usb/uas: use scsi_host_find_tag() to find command from a tag Sebastian Andrzej Siewior
[not found] ` <20111219193955.GA2060-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2011-12-19 19:50 ` Matthew Wilcox
2011-12-19 20:12 ` Sarah Sharp
2011-12-19 21:01 ` Matthew Wilcox
2011-12-16 20:51 ` [usb-storage] Re: Make UAS work on HS for devices with and without command tagging support Sarah Sharp
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=4EE9B375.4020606@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=usb-storage@lists.one-eyed-alien.net \
--cc=willy@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.