From: George Anzinger <george@mvista.com>
To: Martin Diehl <lists@mdiehl.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: tasklets vs. workqueues
Date: Wed, 25 Feb 2004 13:58:10 -0800 [thread overview]
Message-ID: <403D1A72.5000906@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0402252205580.18112-100000@notebook.home.mdiehl.de>
Martin Diehl wrote:
> On Wed, 25 Feb 2004, George Anzinger wrote:
>
>
>>>>Being in process context, you can also change the priority and schedule policy
>>>>as needed to fit your application, while you are rather stuck with tasklets in
>>>>this regard.
>>>
>>>
>>>How would one do that correctly? Something like
>>
>>Depends on where you want to be when you do it. From user land you would do
>>exactly what the attached program does. In SMP you would, likely, want to do
>>all the tasks in the work queue (one per cpu).
>
>
> Ok, thanks - primary concern was kernelthread anyway. Sorry if I wasn't
> clear enough.
>
>
>> From the kernel, again calling setscheduler() is the way to go. I am not sure
>>what is in the community tree just now, but if I recall properly, the scheduler
>>itself does this so, one should be able to copy that code.
>>
>>Ah, yes, there it is in migration_thread(). It calls setscheduler().
>
>
> Basically yes. Except that setscheduler is static in kernel/sched.c so one
> has to use sys_sched_setscheduler (and add some EXPORT_SYMBOL for it). And
> of course it needs the set_fs(KERNEL_DS) magic.
I don't think it needs the set_fs(KERNEL_DS) magic if you use the internal
setscheduler(). If it is static, that should be changed.... as well as the
EXPORT sigh.
-g
>
> Thanks, I was hoping I've missed some simple "official" entry point there
> to create a SCHED_FIFO kernel thread from a module.
>
> Martin
>
>
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
next prev parent reply other threads:[~2004-02-25 22:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0402210140160.1775-100000@notebook.home.mdiehl.de>
2004-02-25 18:56 ` tasklets vs. workqueues George Anzinger
2004-02-25 21:11 ` Martin Diehl
2004-02-25 21:58 ` George Anzinger [this message]
2004-02-16 19:20 Christian Kögler
2004-02-17 1:41 ` Kristian Lyngstøl
2004-02-19 22:44 ` George Anzinger
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=403D1A72.5000906@mvista.com \
--to=george@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@mdiehl.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox