From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Harvey Yang <harvey.huawei.yang@gmail.com>
Cc: Matt Mooney <mfm@muteddisk.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] staging: usbip: refine the lock
Date: Mon, 7 Jan 2013 21:52:34 -0800 [thread overview]
Message-ID: <20130108055234.GB4561@kroah.com> (raw)
In-Reply-To: <1357624142-7178-1-git-send-email-harvey.huawei.yang@gmail.com>
On Tue, Jan 08, 2013 at 01:49:00PM +0800, Harvey Yang wrote:
> This patchset refines some spinlocks which maybe not used properly.
>
> [PATCH 1/2]: The function 'usbip_event_add()' may be called in interrupt context on the stub side:
> 'stub_complete'->'stub_enqueue_ret_unlink'->'usbip_event_add'.
> In this function it tries to get the lock 'ud->lock', so we should disable irq when we get this lock in process context.
>
> [PATCH 2/2]: On the client side, we have a virtual hcd driver, there actually no hardware interrupts, so we do not need worry about race conditions caused by irq. To achieve a good performance there is no need to use the interrupt safe spinlock. Just replace them with a non interrupt safe version.
This information needs to be in the patches itself, otherwise it will
never be seen.
Also, why do you think this is going to make anything faster? Have you
measured it? What are the results?
thanks,
greg k-h
prev parent reply other threads:[~2013-01-08 5:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 5:49 [PATCH 0/2] staging: usbip: refine the lock Harvey Yang
2013-01-08 5:49 ` [PATCH 1/2] staging: usbip: use interrupt safe spinlock to avoid potential deadlock Harvey Yang
2013-01-08 5:51 ` Greg Kroah-Hartman
2013-01-08 5:49 ` [PATCH 2/2] staging: usbip: replace the interrupt safe spinlocks with common ones Harvey Yang
2013-01-08 5:52 ` Greg Kroah-Hartman [this message]
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=20130108055234.GB4561@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=harvey.huawei.yang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mfm@muteddisk.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