[lkml]   [2003]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:48    [W:0.082 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site