linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ville Nummela <ville.nummela@mail.necsom.com>
To: linux-kernel@vger.kernel.org
Subject: tasklets in 2.4.6
Date: 06 Jul 2001 09:42:29 +0300	[thread overview]
Message-ID: <7an16iy2wa.fsf@necsom.com> (raw)

Hi,

I have little question about tasklets in the kernel 2.4.6:

In kernel/softirq.c, line 178:

                if (test_bit(TASKLET_STATE_SCHED, &t->state))
                        tasklet_schedule(t);

What's the idea behind this line? If the tasklet is already scheduled,
schedule it again? This does not make much sense to me.

Also, few lines before:

                       if (test_bit(TASKLET_STATE_SCHED, &t->state))
                                goto repeat;

Here we'll loop forever if the tasklet should schedule itself.

So if the tasklet schedules itself we'll loop it forever, and if it doesn't
it'll get never run again.
If we'd change the line 178 to:

                if (!test_bit(TASKLET_STATE_SCHED, &t->state))

the tasklet would get scheduled if it was NOT scheduled, and everything would
go on happily forever :)

But anyway, I'm probably missing something here, perhaps someone could educate
me a bit ;-)

-- 
 |   ville.nummela@necsom.com tel: +358-40-8480344               
 |   So Linus, what are we doing tonight?                             
 |   The same thing we every night Tux. Try to take over the world!   

             reply	other threads:[~2001-07-06  6:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-06  6:42 Ville Nummela [this message]
2001-07-06  7:08 ` tasklets in 2.4.6 Jeff Garzik
2001-07-06  8:25   ` Jeff Garzik
2001-07-06  8:27     ` Jeff Garzik
2001-07-06 11:57     ` Andrea Arcangeli
2001-07-06 12:07       ` Jeff Garzik
2001-07-09  9:09     ` Ville Nummela
2001-07-09 11:39       ` Ville Nummela
2001-07-09 14:24         ` Andrea Arcangeli
2001-07-06 11:28   ` Andrea Arcangeli

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=7an16iy2wa.fsf@necsom.com \
    --to=ville.nummela@mail.necsom.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).