Skip to content

Conversation

alwa-nordic
Copy link
Contributor

No description provided.

Add a new workqueue bt_taskq specifically designed for quick
non-blocking work items in the Bluetooth subsystem. This workqueue is
always available and does not depend on any Kconfig option.

Signed-off-by: Aleksander Wasaznik <[email protected]>
The Bluetooth Host itself performs operations on the system workqueue
which are blocking waiting for the tx_processor to run. This results in
deadlocks.

TX processor is supposed to be non-blocking, so this change puts it on
the new bt_taskq.

This effectively gives tx_processor its own thread, like the BT TX
thread that used to exist. But, this time this thread is intended to be
shared with any other non-blocking Bluetooth Host tasks.

Signed-off-by: Aleksander Wasaznik <[email protected]>
Now that tx_processor is in bt_taskq, we don't need special handling for
when it runs on the syswq.

Signed-off-by: Aleksander Wasaznik <[email protected]>
Reduce stack sizes for peripheral_hr sample to minimal sizes.

Signed-off-by: Aleksander Wasaznik <[email protected]>
We invoked user callbacks from a net_buf_unref() inside the HCI driver.
This is not OK now that tx_processor is a non-blocking task on bt_taskq.

Instead defer the net_buf destruction to the system workqueue.

This was detected because the following test was failing:

    tests/bsim/bluetooth/ll/throughput/tests_scripts/gatt_write.sh

Signed-off-by: Aleksander Wasaznik <[email protected]>
@alwa-nordic alwa-nordic closed this Oct 9, 2025
@alwa-nordic alwa-nordic reopened this Oct 9, 2025
@alwa-nordic alwa-nordic closed this Oct 9, 2025
Copy link

sonarqubecloud bot commented Oct 9, 2025

Please retry analysis of this Pull-Request directly on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant