public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Juergen Quade <quade@hsnr.de>
To: Nagendra Singh Tomar <nagendra_tomar@adaptec.com>
Cc: linux-kernel@vger.kernel.org, kuznet@ms2.inr.ac.ru,
	Werner Almesberger <wa@almesberger.net>
Subject: Re: tasklet_kill will always hang for recursive tasklets on a UP
Date: Thu, 28 Aug 2003 17:29:34 +0200	[thread overview]
Message-ID: <20030828152934.GA7924@hsnr.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0308272259120.13148-100000@localhost.localdomain>

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.

  reply	other threads:[~2003-08-28 15:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-25  0:00 tasklet_kill will always hang for recursive tasklets on a UP Nagendra Singh Tomar
2003-08-25  1:53 ` Nagendra Singh Tomar
2003-08-25 14:11 ` Juergen Quade
2003-08-25 17:14   ` Nagendra Singh Tomar
2003-08-27 18:21     ` Juergen Quade
2003-08-27 17:46       ` Nagendra Singh Tomar
2003-08-28 15:29         ` Juergen Quade [this message]
2003-08-28 15:53           ` kuznet
2003-08-28 16:17             ` Juergen Quade
2003-08-29  2:22               ` Werner Almesberger
2003-08-26  5:48 ` Werner Almesberger
2003-08-25 18:45   ` Nagendra Singh Tomar
2003-08-26  7:38     ` Werner Almesberger
2003-08-26  8:32       ` Juergen Quade
2003-08-26 17:56         ` Werner Almesberger
2003-08-27  1:47           ` kuznet
2003-08-26 16:17             ` Nagendra Singh Tomar
2003-08-28 13:17               ` kuznet
2003-08-28 16:25                 ` Nagendra Singh Tomar
2003-09-04 13:25                   ` kuznet
2003-08-29  2:30             ` Werner Almesberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030828152934.GA7924@hsnr.de \
    --to=quade@hsnr.de \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nagendra_tomar@adaptec.com \
    --cc=wa@almesberger.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox