From: Dave <kilroyd@googlemail.com>
To: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: orinoco-devel@lists.sourceforge.net,
linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH] orinoco: take the driver lock in the rx tasklet
Date: Thu, 22 Jan 2009 19:58:39 +0000 [thread overview]
Message-ID: <4978CFEF.9090507@gmail.com> (raw)
In-Reply-To: <200901220702.14152.arvidjaar@mail.ru>
Andrey Borzenkov wrote:
> On 8 January 2009 21:24:16 Dave wrote:
>> The move to the RX tasklet was not motivated by improved performance,
>> but the requirements of the crypto library (can't call from
>> interrupt) and the need to do MIC calculations on RX.
> What exactly prevents crypto library being called from interrupt (aka
> can it sleep)?
I don't know precisely, but have a look at the Developer section of
Documentation/crypto/api-intro.txt, and note that during RX we call the
setkey method of the MIC implementation to pass it the TKIP key.
> Because now it runs under spinlock with interrupts
> disabled; how exactly does it differ from being called from interrupt
> context?
Running in interrupt context is not necessarily the same as running with
interrupts disabled. For example, different platforms will have
different arrangements for your stack.
>> Unless the crypto routines have changed, reverting that commit will
>> break WPA support.
> For all I can tell, code now is functionally identical to code before
> moving rx processing to tasklet. Meaning, if it was wrong before it
> became just as wrong now.
That was the intent of this patch. Prior to WPA, the entire orinoco RX
path ran under a spinlock (and as far as I am aware was correct). After
WPA, only half did. The code is now as correct (or wrong) as it was
before the WPA patch (modulo the WPA stuff).
It is clear that a lot of the RX tasklet does not need to run with the
spinlock. But I prefer to reinstate the known correct locking behaviour
and then minimise what runs under the spinlock, than to try and go from
a broken state directly to an 'optimal' state.
One thing I want to play with (if I ever get time) is the whole locking
strategy in orinoco. I'm not a fan of the single lock protecting
hardware calls, driver data and now the RX queue. I would like to see if
we can separate them and get a bit of performance. Note that David
Gibson considered this a number of years back (more from the perspective
of USB support I think), and came to the opinion that the whole driver
should be serialized.
However I think this would be easier if we could get rid of all the WEXT
handlers, and configure the driver through the thinner cfg80211
interface. That is part of what my upcoming re-org of the orinoco driver
is aiming for.
I think that's enough from me for now...
Regards,
Dave.
prev parent reply other threads:[~2009-01-22 19:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 0:23 [PATCH] orinoco: take the driver lock in the rx tasklet David Kilroy
2009-01-08 8:28 ` Andrey Borzenkov
2009-01-08 18:24 ` Dave
2009-01-08 18:55 ` Andrey Borzenkov
2009-01-22 4:02 ` Andrey Borzenkov
2009-01-22 19:58 ` Dave [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=4978CFEF.9090507@gmail.com \
--to=kilroyd@googlemail.com \
--cc=arvidjaar@mail.ru \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=orinoco-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).