On Mon, 2007-06-25 at 14:48 -0400, Kristian Høgsberg wrote:
Thanks for speaking up!
The gross wrappers were a perfect way to shed light on something that is
overused, and should most likely be replaced.
Does your system need to have these functions that are in tasklets need
to be non-reentrant? I wonder how many "irq critical" functions used
tasklets just because adding a softirq requires too much (no generic
softirq code). A tasklet is constrained to run on one CPU at a time,
and it is not guaranteed to run on the CPU it was scheduled on.
Perhaps it's time to add a new functionality while removing tasklets.
Things that are ok to bounce around CPUs (like tasklets do) can most
likely be replaced by a work queue. But these highly critical tasks
probably would benefit from being a softirq.
Maybe we should be looking at something like GENERIC_SOFTIRQ to run
functions that a driver could add. But they would run only on the CPU
that scheduled them, and do not guarantee non-reentrant as tasklets do
today.
I think I even found a bug in a driver that was trying to get around the
non-reentrancy of a tasklet (will post this soon).
It's looking like only a few tasklets have this critical requirement,
and are the candidates to move to a more generic softirq. The rest of
the tasklets would be switched to work queues, and this gross wrapper of
mine can do that in the meantime so we can find those that should be
converted to a generic softirq.
-- Steve
-