Re: workqueue and kworker
From: Tejun Heo
Date: Thu Jul 19 2012 - 13:07:34 EST
On Fri, Jul 20, 2012 at 01:01:34AM +0900, Round Robinjp wrote:
> It seems that even if you create a dedicated workqueue
> in your driver, it does not give you a dedicated
> kworker thread. Is this normal behaviour?
> If so, then what is the difference between using
> generic workqueue and dedicated workqueue?
Please read Documentation/workqueue.txt.
> I need to set the priority of my kworker thread high
> (a specific value). For that I called sched_setscheduler()
> in my workqueue handler. But I found that other
> workqueues are also being executed on my high priority
> kworker thread which is unexpected.
> How do I give high priority to my kworker thread
> without affecting the behaviour of other workqueues?
If you want a dedicated worker thread, please use kthread_worker in
include/linux/kthread.h. Or all you want is just higher nice value,
3.6 is reimplemnting WQ_HIGHPRI so that highpri tasks are executed w/
-20 nice value.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/