* Tasklets vs. Task Queues for Deferred Processing
@ 2003-03-28 23:14 J S
2003-03-29 8:12 ` Juergen Quade
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: J S @ 2003-03-28 23:14 UTC (permalink / raw)
To: Linux Kernel Mailing List
I'm trying to defer some processing to a later point. I'm in a softirq,
so in_interrupt() returns true. I need to schedule some work for later,
in process context. I have read in the O'Reilly linux device drivers
book that tasklets always run in interrupt time. Also, I guess the only
task_queue that is in process context is the scheduler task queue. I've
seen in a few places that task queues are on their way out and tasklets
are being used instead. Is this completely true? Should I consider
task queues as a deprecated method of deferred processing?` What other
deferred processing methods can I use that will run in process context?
Thanks,
Josh
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Tasklets vs. Task Queues for Deferred Processing
2003-03-28 23:14 Tasklets vs. Task Queues for Deferred Processing J S
@ 2003-03-29 8:12 ` Juergen Quade
2003-03-29 8:12 ` Duncan Sands
2003-03-29 21:48 ` Jonathan Corbet
2 siblings, 0 replies; 4+ messages in thread
From: Juergen Quade @ 2003-03-29 8:12 UTC (permalink / raw)
To: J S; +Cc: Linux Kernel Mailing List
On Fri, Mar 28, 2003 at 06:14:37PM -0500, J S wrote:
> I'm trying to defer some processing to a later point. I'm in a softirq,
> so in_interrupt() returns true. I need to schedule some work for later,
> in process context. I have read in the O'Reilly linux device drivers
> book that tasklets always run in interrupt time. Also, I guess the only
> task_queue that is in process context is the scheduler task queue. I've
> seen in a few places that task queues are on their way out and tasklets
> are being used instead. Is this completely true? Should I consider
True.
> task queues as a deprecated method of deferred processing?` What other
> deferred processing methods can I use that will run in process context?
Beside application triggered driver functions (open, close, read,
write ...) you can (only) use kernel threads.
You can use "pure" kernel threads, workqueues or especially the
kevent-daemon (2.4.x) or the event-workqueue (2.5.x).
If you only need to call something like a short function, use
the work queue. Need more info?
Juergen.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Tasklets vs. Task Queues for Deferred Processing
2003-03-28 23:14 Tasklets vs. Task Queues for Deferred Processing J S
2003-03-29 8:12 ` Juergen Quade
@ 2003-03-29 8:12 ` Duncan Sands
2003-03-29 21:48 ` Jonathan Corbet
2 siblings, 0 replies; 4+ messages in thread
From: Duncan Sands @ 2003-03-29 8:12 UTC (permalink / raw)
To: J S, Linux Kernel Mailing List
On Saturday 29 March 2003 00:14, J S wrote:
> I'm trying to defer some processing to a later point. I'm in a softirq,
> so in_interrupt() returns true. I need to schedule some work for later,
> in process context. I have read in the O'Reilly linux device drivers
> book that tasklets always run in interrupt time. Also, I guess the only
> task_queue that is in process context is the scheduler task queue. I've
> seen in a few places that task queues are on their way out and tasklets
> are being used instead. Is this completely true? Should I consider
> task queues as a deprecated method of deferred processing?` What other
> deferred processing methods can I use that will run in process context?
In 2.5, use a workqueue.
Duncan.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Tasklets vs. Task Queues for Deferred Processing
2003-03-28 23:14 Tasklets vs. Task Queues for Deferred Processing J S
2003-03-29 8:12 ` Juergen Quade
2003-03-29 8:12 ` Duncan Sands
@ 2003-03-29 21:48 ` Jonathan Corbet
2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2003-03-29 21:48 UTC (permalink / raw)
To: J S; +Cc: linux-kernel
> I have read in the O'Reilly linux device drivers
> book that tasklets always run in interrupt time. Also, I guess the only
> task_queue that is in process context is the scheduler task queue. I've
> seen in a few places that task queues are on their way out and tasklets
> are being used instead. Is this completely true?
All true. If you're developing for 2.4, you can use schedule_task() and
life will be OK. For 2.5, you really want to use work queues instead; see
http://lwn.net/Articles/23634/ for a description of how to do that.
jon
Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-03-29 21:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-28 23:14 Tasklets vs. Task Queues for Deferred Processing J S
2003-03-29 8:12 ` Juergen Quade
2003-03-29 8:12 ` Duncan Sands
2003-03-29 21:48 ` Jonathan Corbet
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.