From: David Vrabel <david.vrabel@csr.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Process HCI events in a workqueue instead of a tasklet
Date: Tue, 10 Aug 2010 15:27:35 +0100 [thread overview]
Message-ID: <4C6161D7.7070507@csr.com> (raw)
In-Reply-To: <1281446085.12579.212.camel@localhost.localdomain>
Marcel Holtmann wrote:
> Hi David,
>
>>>> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
>>>> ---
>>>> include/net/bluetooth/hci_core.h | 2 +
>>>> net/bluetooth/hci_core.c | 58 ++++++++++++++++++++++++++++++++-----
>>>> 2 files changed, 52 insertions(+), 8 deletions(-)
>>> so I stuffed this now into bluetooth-testing tree and would like to see
>>> some extra testing exposure. So far this has only been tested by myself.
>>>
>>> If there are no regression then this should make a lot of HCI and L2CAP
>>> handling a lot simple.
>> This may result in packets being processed in a different order to that
>> which they were received in.
>>
>> e.g., what happens to an ACL packet processed before the connection
>> complete event for that connection?
>
> good point. So we would either a) need to disable the RX tasklet when we
> receive an event and schedule it for processing or b) process the ACL
> data also in a workqueue.
I think my preferred solution would be for the rx function called by the
HCI transport drivers to be called in a thread context. There should be
a helper function that is callable in atomic context that queues the
packets to be processed in a workqueue.
Our UWB drivers already process packets in a thread so would prefer to
avoid another thread context switch.
Shall I prepare a patch?
David
--
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
next prev parent reply other threads:[~2010-08-10 14:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 3:06 [PATCH] Bluetooth: Process HCI events in a workqueue instead of a tasklet Marcel Holtmann
2010-08-10 12:15 ` Marcel Holtmann
2010-08-10 12:50 ` David Vrabel
2010-08-10 13:14 ` Marcel Holtmann
2010-08-10 14:27 ` David Vrabel [this message]
2010-08-10 21:41 ` Marcel Holtmann
2010-08-12 22:20 ` David Vrabel
2010-08-13 8:35 ` Marcel Holtmann
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=4C6161D7.7070507@csr.com \
--to=david.vrabel@csr.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/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).