Re: Scheduling tasklets from process context...

From: Kenneth Aafløy
Date: Tue Apr 05 2005 - 22:09:34 EST


On Wednesday 06 April 2005 04:50, you wrote:
> Since tasklets are typically used for bottom half processing, is it
> acceptable/recommended that they be scheduled from a process context
> (say an ioctl handler)?
>
> Should one try to minimize such scheduling and try to do things in process
> context if possible, as tasklets run in interrupt context? Or is the driver
> writer free to use the tasklets at will? What is recommended here?

A tasklet does not run in interrupt context, it runs as a high priority thread,
that is scheduled from either user or interrupt context. The purpose is mostly
to defer workloads from interrupt context, to reduce the time spent with
interrupts disabled.

It would make sense to defer work from userspace to a tasklet if the hardware
takes an unusual amount of time to process the userspace data.

Correct me if I'm wrong :)

Kenneth
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/