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
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.
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.
> 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
[email protected]