aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-06-29 04:07:15 -0400
committerTejun Heo <tj@kernel.org>2010-06-29 04:07:15 -0400
commitfb0e7beb5c1b6fb4da786ba709d7138373d5fb22 (patch)
treee222b2238ed691ced6eaeb47733f7e4c2b9a3c37 /include/linux
parent649027d73a6309ac34dc2886362e662bd73456dc (diff)
workqueue: implement cpu intensive workqueue
This patch implements cpu intensive workqueue which can be specified with WQ_CPU_INTENSIVE flag on creation. Works queued to a cpu intensive workqueue don't participate in concurrency management. IOW, it doesn't contribute to gcwq->nr_running and thus doesn't delay excution of other works. Note that although cpu intensive works won't delay other works, they can be delayed by other works. Combine with WQ_HIGHPRI to avoid being delayed by other works too. As the name suggests this is useful when using workqueue for cpu intensive works. Workers executing cpu intensive works are not considered for workqueue concurrency management and left for the scheduler to manage. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/workqueue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 006dcf7e808a..3f36d37ac5ba 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -232,6 +232,7 @@ enum {
232 WQ_NON_REENTRANT = 1 << 2, /* guarantee non-reentrance */ 232 WQ_NON_REENTRANT = 1 << 2, /* guarantee non-reentrance */
233 WQ_RESCUER = 1 << 3, /* has an rescue worker */ 233 WQ_RESCUER = 1 << 3, /* has an rescue worker */
234 WQ_HIGHPRI = 1 << 4, /* high priority */ 234 WQ_HIGHPRI = 1 << 4, /* high priority */
235 WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */
235 236
236 WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ 237 WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */
237 WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, 238 WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2,