Re: [ACPI] acpi_os_queue_for_execution()

From: Pavel Machek (pavel@suse.cz)
Date: Mon Jan 06 2003 - 06:12:04 EST


Hi!

> > Acpi seems to create short-lived kernel threads, and I don't quite
> > understand why.
> >
> > In thermal.c
> >
> >
> > tz->timer.data = (unsigned long) tz;
> > tz->timer.function = acpi_thermal_run;
> > tz->timer.expires = jiffies + (HZ *
> > sleep_time) / 1000;
> > add_timer(&(tz->timer));
> >
> > and acpi_thermal_run creates kernel therad that runs
> > acpi_thermal_check. Why is not acpi_thermal_check called directly? I
> > don't like idea of thread being created every time thermal zone needs
> > to be polled...
>
> Are we allowed to block in a timer callback? One of the things
> thermal_check does is call a control method, which in turn can be very
> slow, sleep, etc., so I'd guess that's why the code tries to execute
> things in its own thread.

But... Creating a kernel thread can block, too? [Correct me if I'm
wrong, but creating a kernel thread looks like a *lot* of semaphores
taken to me].

                                Pavel

-- 
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
-
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/



This archive was generated by hypermail 2b29 : Tue Jan 07 2003 - 22:00:31 EST