[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1359657696-2767-8-git-send-email-laijs@cn.fujitsu.com>
Date: Fri, 1 Feb 2013 02:41:30 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Subject: [PATCH 07/13] workqueue: get pool from wq/cwq
__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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists