* workqueue and kworker
@ 2012-07-19 16:01 Round Robinjp
2012-07-19 17:07 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Round Robinjp @ 2012-07-19 16:01 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org
Hi
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?
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?
Thanks
RR
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: workqueue and kworker
2012-07-19 16:01 workqueue and kworker Round Robinjp
@ 2012-07-19 17:07 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2012-07-19 17:07 UTC (permalink / raw)
To: Round Robinjp; +Cc: linux-kernel@vger.kernel.org
Hello,
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?
Yes.
> 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.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-19 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 16:01 workqueue and kworker Round Robinjp
2012-07-19 17:07 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).