linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tasklets in 2.4.6
@ 2001-07-06  6:42 Ville Nummela
  2001-07-06  7:08 ` Jeff Garzik
  0 siblings, 1 reply; 10+ messages in thread
From: Ville Nummela @ 2001-07-06  6:42 UTC (permalink / raw)
  To: linux-kernel

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!   

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-07-09 14:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-06  6:42 tasklets in 2.4.6 Ville Nummela
2001-07-06  7:08 ` 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

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).