lkml.org 
[lkml]   [2013]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/13] workqueue: get pool from wq/cwq
Date
__queue_work() calls to get_std_worker_pool(), it is indirectly,
we should get it directly from wq/cwq.

It is needed when we introduce non-std worker pool.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
kernel/workqueue.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 9f04416..a138844 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1212,7 +1212,6 @@ static bool is_chained_work(struct workqueue_struct *wq)
static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
struct work_struct *work)
{
- bool highpri = wq->flags & WQ_HIGHPRI;
struct worker_pool *pool;
struct cpu_workqueue_struct *cwq;
struct list_head *worklist;
@@ -1247,7 +1246,7 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
* work needs to be queued on that cpu to guarantee
* non-reentrancy.
*/
- pool = get_std_worker_pool(cpu, highpri);
+ pool = get_cwq(cpu, wq)->pool;
last_pool = get_work_pool(work);

if (last_pool && last_pool != pool) {
@@ -1268,7 +1267,7 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
spin_lock(&pool->lock);
}
} else {
- pool = get_std_worker_pool(WORK_CPU_UNBOUND, highpri);
+ pool = get_cwq(WORK_CPU_UNBOUND, wq)->pool;
spin_lock(&pool->lock);
}

--
1.7.7.6


\
 
 \ /
  Last update: 2013-01-31 21:02    [W:0.290 / U:2.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site