Re: tasklet_kill will always hang for recursive tasklets on a UP

From: Werner Almesberger
Date: Tue Aug 26 2003 - 00:49:32 EST


Nagendra Singh Tomar wrote:
> While going thru the code for tasklet_kill(), I cannot figure out
> how recursive tasklets (tasklets that schedule themselves from within
> their tasklet handler) can be killed by this function. To me it looks that
> tasklet_kill will never complete for such tasklets.

That's also what I found when looking at it a while ago. This isn't
necessarily a bug of tasklet_kill, just some behaviour that needs
to be documented.

You can always introduce a flag that tells the tasklet if it should
reschedule itself, and clear that flag before calling tasklet_kill.

When I looked at it (I think this was in some 2.4 kernel), it also
seemed that tasklet_kill could loop forever if the tasklet is
scheduled but disabled.

- Werner

--
_________________________________________________________________________
/ Werner Almesberger, Buenos Aires, Argentina wa@xxxxxxxxxxxxxxx /
/_http://www.almesberger.net/____________________________________________/
-
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/