All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Round Robinjp <roundrobinjp@yahoo.co.jp>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: workqueue and kworker
Date: Thu, 19 Jul 2012 10:07:34 -0700	[thread overview]
Message-ID: <20120719170734.GQ24336@google.com> (raw)
In-Reply-To: <877727.54297.qm@web100708.mail.kks.yahoo.co.jp>

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

      reply	other threads:[~2012-07-19 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 16:01 workqueue and kworker Round Robinjp
2012-07-19 17:07 ` Tejun Heo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120719170734.GQ24336@google.com \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roundrobinjp@yahoo.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.