aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-06-29 04:07:09 -0400
committerTejun Heo <tj@kernel.org>2010-06-29 04:07:09 -0400
commitc790bce0481857412c964c5e9d46d56e41c4b051 (patch)
tree82e87167b78bbf3456a53d057b1b741c250a0b76
parent8fec62b2d9d0c80b594d0d85678bfdf57a70df1b (diff)
workqueue: kill RT workqueue
With stop_machine() converted to use cpu_stop, RT workqueue doesn't have any user left. Kill RT workqueue support. Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--include/linux/workqueue.h20
-rw-r--r--kernel/workqueue.c6
2 files changed, 9 insertions, 17 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 9466e860d8c2..0697946c66a1 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -181,12 +181,11 @@ static inline void destroy_work_on_stack(struct work_struct *work) { }
181 181
182 182
183extern struct workqueue_struct * 183extern struct workqueue_struct *
184__create_workqueue_key(const char *name, int singlethread, 184__create_workqueue_key(const char *name, int singlethread, int freezeable,
185 int freezeable, int rt, struct lock_class_key *key, 185 struct lock_class_key *key, const char *lock_name);
186 const char *lock_name);
187 186
188#ifdef CONFIG_LOCKDEP 187#ifdef CONFIG_LOCKDEP
189#define __create_workqueue(name, singlethread, freezeable, rt) \ 188#define __create_workqueue(name, singlethread, freezeable) \
190({ \ 189({ \
191 static struct lock_class_key __key; \ 190 static struct lock_class_key __key; \
192 const char *__lock_name; \ 191 const char *__lock_name; \
@@ -197,19 +196,18 @@ __create_workqueue_key(const char *name, int singlethread,
197 __lock_name = #name; \ 196 __lock_name = #name; \
198 \ 197 \
199 __create_workqueue_key((name), (singlethread), \ 198 __create_workqueue_key((name), (singlethread), \
200 (freezeable), (rt), &__key, \ 199 (freezeable), &__key, \
201 __lock_name); \ 200 __lock_name); \
202}) 201})
203#else 202#else
204#define __create_workqueue(name, singlethread, freezeable, rt) \ 203#define __create_workqueue(name, singlethread, freezeable) \
205 __create_workqueue_key((name), (singlethread), (freezeable), (rt), \ 204 __create_workqueue_key((name), (singlethread), (freezeable), \
206 NULL, NULL) 205 NULL, NULL)
207#endif 206#endif
208 207
209#define create_workqueue(name) __create_workqueue((name), 0, 0, 0) 208#define create_workqueue(name) __create_workqueue((name), 0, 0)
210#define create_rt_workqueue(name) __create_workqueue((name), 0, 0, 1) 209#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1)
211#define create_freezeable_workqueue(name) __create_workqueue((name), 1, 1, 0) 210#define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0)
212#define create_singlethread_workqueue(name) __create_workqueue((name), 1, 0, 0)
213 211
214extern void destroy_workqueue(struct workqueue_struct *wq); 212extern void destroy_workqueue(struct workqueue_struct *wq);
215 213
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 327d2deb4451..1a47fbf92fae 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -62,7 +62,6 @@ struct workqueue_struct {
62 const char *name; 62 const char *name;
63 int singlethread; 63 int singlethread;
64 int freezeable; /* Freeze threads during suspend */ 64 int freezeable; /* Freeze threads during suspend */
65 int rt;
66#ifdef CONFIG_LOCKDEP 65#ifdef CONFIG_LOCKDEP
67 struct lockdep_map lockdep_map; 66 struct lockdep_map lockdep_map;
68#endif 67#endif
@@ -947,7 +946,6 @@ init_cpu_workqueue(struct workqueue_struct *wq, int cpu)
947 946
948static int create_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu) 947static int create_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu)
949{ 948{
950 struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 };
951 struct workqueue_struct *wq = cwq->wq; 949 struct workqueue_struct *wq = cwq->wq;
952 const char *fmt = is_wq_single_threaded(wq) ? "%s" : "%s/%d"; 950 const char *fmt = is_wq_single_threaded(wq) ? "%s" : "%s/%d";
953 struct task_struct *p; 951 struct task_struct *p;
@@ -963,8 +961,6 @@ static int create_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu)
963 */ 961 */
964 if (IS_ERR(p)) 962 if (IS_ERR(p))
965 return PTR_ERR(p); 963 return PTR_ERR(p);
966 if (cwq->wq->rt)
967 sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
968 cwq->thread = p; 964 cwq->thread = p;
969 965
970 trace_workqueue_creation(cwq->thread, cpu); 966 trace_workqueue_creation(cwq->thread, cpu);
@@ -986,7 +982,6 @@ static void start_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu)
986struct workqueue_struct *__create_workqueue_key(const char *name, 982struct workqueue_struct *__create_workqueue_key(const char *name,
987 int singlethread, 983 int singlethread,
988 int freezeable, 984 int freezeable,
989 int rt,
990 struct lock_class_key *key, 985 struct lock_class_key *key,
991 const char *lock_name) 986 const char *lock_name)
992{ 987{
@@ -1008,7 +1003,6 @@ struct workqueue_struct *__create_workqueue_key(const char *name,
1008 lockdep_init_map(&wq->lockdep_map, lock_name, key, 0); 1003 lockdep_init_map(&wq->lockdep_map, lock_name, key, 0);
1009 wq->singlethread = singlethread; 1004 wq->singlethread = singlethread;
1010 wq->freezeable = freezeable; 1005 wq->freezeable = freezeable;
1011 wq->rt = rt;
1012 INIT_LIST_HEAD(&wq->list); 1006 INIT_LIST_HEAD(&wq->list);
1013 1007
1014 if (singlethread) { 1008 if (singlethread) {