2023-02-13 09:13:18 +00:00
|
|
|
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
|
2023-03-23 10:20:43 +00:00
|
|
|
index 7cd5f5e7e..c717a06b7 100644
|
2023-02-13 09:13:18 +00:00
|
|
|
--- a/kernel/workqueue.c
|
|
|
|
+++ b/kernel/workqueue.c
|
2023-03-23 10:20:43 +00:00
|
|
|
@@ -782,7 +782,10 @@ static bool work_is_canceling(struct work_struct *work)
|
2023-02-13 09:13:18 +00:00
|
|
|
|
|
|
|
static bool __need_more_worker(struct worker_pool *pool)
|
|
|
|
{
|
2023-03-23 10:20:43 +00:00
|
|
|
- return !pool->nr_running;
|
2023-02-13 09:13:18 +00:00
|
|
|
+ /*
|
|
|
|
+ * Assume two works can deadlock and make a third available
|
|
|
|
+ */
|
2023-03-23 10:20:43 +00:00
|
|
|
+ return pool->nr_running < 3;
|
2023-02-13 09:13:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|