Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipc: icmsg: Dedicated workqueue for ICMSG backend
The ICMSG backend now has a dedicated workqueue to process incoming IPC messages. The system workqueue is no longer utilized for that purpose. Testing shows that in certain scenarios substituting a RPMsg backend with ICMsg results in deadlocks. The deadlocks were a symptom of running a synchronous RPC protocol from the context of the system workqueue and transpired as follows: 1. The RPC protocol sends a request over the ICMsg backend on the system workqueue thread. 2. The RPC protocol puts the thread to sleep until response is received. This puts the system workqueue thread to sleep. 3. The response to the request arrives over ICMsg backend. 4. The backend signals a work item to the system workqueue. 5. The system workqueue is unable to process the response due to being previously pended on the RPC request. The deadlock was initially observed with the nrf-802154 driver in conjuntion with the IPv6 stack. To prevent this condition from occurring, the approach was selected to give ICMsg a dedicated workqueue thread. Added a Kconfig option that enables the dedicated workqueue by default. The config can be disabled, if the user wants to preserve RAM capacity and is certain that the deadlock condition is not encountered. (cherry picked from commit 5b12b6a) Original-Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no> GitOrigin-RevId: 5b12b6a Change-Id: I66e83a22129578787f4d3650bfa2b1d1c751d26b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4858570 Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com> Tested-by: Tristan Honscheid <honscheid@google.com>
- Loading branch information