lkml.org 
[lkml]   [2013]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 11/15] workqueue: split work_flags to delayed_flags and color_flags in __queue_work()
Date
Allow we use delayed_flags only in different path in later patches.

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

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 7ac6824..cdd5523 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1226,7 +1226,7 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
{
struct cpu_workqueue_struct *cwq;
struct list_head *worklist;
- unsigned int work_flags;
+ unsigned int color_flags, delayed_flags = 0;
unsigned int req_cpu = cpu;

/*
@@ -1284,18 +1284,18 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
}

cwq->nr_in_flight[cwq->work_color]++;
- work_flags = work_color_to_flags(cwq->work_color);

if (likely(cwq->nr_active < cwq->max_active)) {
trace_workqueue_activate_work(work);
cwq->nr_active++;
worklist = &cwq->pool->worklist;
} else {
- work_flags |= WORK_STRUCT_DELAYED;
+ delayed_flags = WORK_STRUCT_DELAYED;
worklist = &cwq->delayed_works;
}

- insert_work(cwq, work, worklist, work_flags);
+ color_flags = work_color_to_flags(cwq->work_color);
+ insert_work(cwq, work, worklist, color_flags | delayed_flags);

spin_unlock(&cwq->pool->lock);
}
--
1.7.7.6


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