From: Keith Packard <keithp@keithp.com>
To: Oliver Neukum <oneukum@suse.com>
Cc: linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: check for signals in chaoskey read function
Date: Tue, 16 Feb 2016 11:09:55 -0800 [thread overview]
Message-ID: <86h9h8ii9o.fsf@hiro.keithp.com> (raw)
In-Reply-To: <1455611093.4532.2.camel@suse.com>
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
Oliver Neukum <oneukum@suse.com> writes:
> why is this needed? You are doing this right after a
> mutex_lock_interruptible().
When the device isn't contended, this mutex will never block and so
mutex_lock_interruptible will never check for a signal.
I had mistakenly assumed that usb_bulk_msg would abort when a signal was
delivered, but it doesn't.
I could be convinced that the driver should be using a different path
through the USB stack that would allow a signal to wake up while waiting
for the URB to complete, but this patch at least avoids needing to wait
for a huge read to finish. The other option would be to eliminate the
loop reading multiple URBs from the device, but that would reduce the
available bandwidth from the device pretty considerably.
--
-keith
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 810 bytes --]
next prev parent reply other threads:[~2016-02-16 19:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 2:49 [PATCH] usb: check for signals in chaoskey read function Keith Packard
2016-02-16 8:24 ` Oliver Neukum
2016-02-16 19:09 ` Keith Packard [this message]
2016-02-17 14:59 ` Oliver Neukum
2016-02-17 18:05 ` Keith Packard
2016-02-17 18:21 ` Keith Packard
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=86h9h8ii9o.fsf@hiro.keithp.com \
--to=keithp@keithp.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.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.