Messages in this thread | | | Date | Thu, 28 Aug 2003 17:29:34 +0200 | From | Juergen Quade <> | Subject | Re: tasklet_kill will always hang for recursive tasklets on a UP |
| |
On Wed, Aug 27, 2003 at 11:16:52PM +0530, Nagendra Singh Tomar wrote: > Juergen, > The whole tasklet_kill function is a big confusion. It is a big > misnomer as Werner rightly said. For non-recursive tasklets this > function does not do anything. Its just an expensive "nop". If you simply > call tasklet_schedule after tasklet_kill, it will execute as nothing had > happened. > If we remove the line > > clear_bit(TASKLET_STATE_SCHED, &t->state); > > from tasklet_kill then tasklet_kill will have the desired effect of > "killing" the tasklet, tasklet_schedule() after tasklet_kill in that case, > will not call __tasklet_kill and hence it will not be queued to the CPU > queue and hence it will not run (desired effect).
Here we have it! In my opintion, the line
clear_bit(TASKLET_STATE_SCHED, &t->state);
is just a _BUG_. The programmer _wanted_ to write
set_bit(TASKLET_STATE_SCHED, &t->state);
In this case the function tasklet_kill _makes sense_ (beside the problem of not working with recursive taskets)! It will mostly be called in the cleanup function of a module and - yes - it would be useful.
So in my opintion 1. we should fix the bug (very easy) 2. we should find some means to make it usable for recursive tasklets.
Juergen. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |