genode/repos/dde_linux/patches/legacy_workqueue_deadlock.patch
Sebastian Sumpf 4a7a4cfac5 dde_linux: move linux.port to legacy_linux.port
This is prerequisite for the Linux update. All dependencies relying on
the 'linux' have been adjusted to use 'legacy_linux'.

Issue #5264
2024-08-27 15:33:31 +02:00

21 lines
645 B
Diff

This patch increases the amount of worker that will be spawned upon a work queue
when a work is submitted. The patch implies that three workers will be used for
three works (before it was one). The fourth work will be queued.
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 7cd5f5e7e..c717a06b7 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -782,7 +782,10 @@ static bool work_is_canceling(struct work_struct *work)
static bool __need_more_worker(struct worker_pool *pool)
{
- return !pool->nr_running;
+ /*
+ * Assume two works can deadlock and make a third available
+ */
+ return pool->nr_running < 3;
}
/*