From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
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: Wed, 14 Dec 2011 14:53:31 -0800 [thread overview]
Message-ID: <20111214225331.GA5508@xanatos> (raw)
In-Reply-To: <1323888472-21035-1-git-send-email-bigeasy@linutronix.de>
On Wed, Dec 14, 2011 at 07:47:50PM +0100, Sebastian Andrzej Siewior wrote:
> Hi Sarah and Matthew,
>
> the two patches were required to get my new fancy uasp gadget work on HS
> with dummy_hcd. It is processing only one command at a time however it
> caught a few bugs already :)
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?
> 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.
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
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.
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.
Sarah Sharp
next prev parent reply other threads:[~2011-12-14 22:53 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 ` Sarah Sharp [this message]
2011-12-15 8:44 ` Make UAS work on HS for devices with and without command tagging support Sebastian Andrzej Siewior
[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=20111214225331.GA5508@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=bigeasy@linutronix.de \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox