[PATCH 04/32] bio-integrity: mark kintegrityd_wq highpri and CPU intensive

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tejun Heo
Date: Monday, January 3, 2011 - 6:49 am

Work items processed by kintegrityd_wq won't block much, may burn a
lot of CPU cycles and affect IO latency.  Use alloc_workqueue() to
mark it highpri and CPU intensive with max concurrency of 1.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
---
Only compile tested.  Please feel free to take it into the subsystem
tree or simply ack - I'll route it through the wq tree.

Thanks.

 fs/bio-integrity.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
index 4d0ff5e..e49cce2 100644
--- a/fs/bio-integrity.c
+++ b/fs/bio-integrity.c
@@ -782,7 +782,12 @@ void __init bio_integrity_init(void)
 {
 	unsigned int i;
 
-	kintegrityd_wq = create_workqueue("kintegrityd");
+	/*
+	 * kintegrityd won't block much but may burn a lot of CPU cycles.
+	 * Make it highpri CPU intensive wq with max concurrency of 1.
+	 */
+	kintegrityd_wq = alloc_workqueue("kintegrityd", WQ_MEM_RECLAIM |
+					 WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
 	if (!kintegrityd_wq)
 		panic("Failed to create kintegrityd\n");
 
-- 
1.7.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 01/32] arm/omap: use system_wq in mailbox, Tejun Heo, (Mon Jan 3, 6:49 am)
[PATCH 04/32] bio-integrity: mark kintegrityd_wq highpri a ..., Tejun Heo, (Mon Jan 3, 6:49 am)
[PATCH 11/32] v4l/cx18: update workqueue usage, Tejun Heo, (Mon Jan 3, 6:49 am)
[PATCH 25/32] ext4: convert to alloc_workqueue(), Tejun Heo, (Mon Jan 3, 6:49 am)
[PATCH 28/32] xfs: convert to alloc_workqueue(), Tejun Heo, (Mon Jan 3, 6:49 am)
Re: [PATCH 20/32] video/msm_fb: use system_wq instead of d ..., Stanislaw Gruszka, (Mon Jan 3, 10:06 am)
Re: [PATCH 01/32] arm/omap: use system_wq in mailbox, Kanigeri, Hari, (Mon Jan 3, 2:35 pm)
Re: [PATCH 11/32] v4l/cx18: update workqueue usage, Andy Walls, (Mon Jan 3, 5:54 pm)
Re: [PATCH 11/32] v4l/cx18: update workqueue usage, Andy Walls, (Tue Jan 4, 6:21 am)