"Grover, Andrew" wrote:
>
> > From: Pavel Machek [mailto:[email protected]]
> > 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.
>
acpi_thermal_run is doing many sinful things. Blocking memory
allocations as well as launching kernel threads from within a
timer handler.
Converting it to use schedule_work() or schedule_delayed_work()
would fix that up.
--On Monday, January 06, 2003 03:44:23 -0800 Andrew Morton <[email protected]>
wrote:
> acpi_thermal_run is doing many sinful things. Blocking memory
> allocations as well as launching kernel threads from within a
> timer handler.
>
> Converting it to use schedule_work() or schedule_delayed_work()
> would fix that up.
So *that* is why ACPI kernels are so slow on my laptop (Dell i8k), and make
so much heat. I bet one of those threads ends up busy looping because of
other brokenness.
Andrew McGregor [[email protected]] wrote:
> So *that* is why ACPI kernels are so slow on my laptop (Dell i8k), and make
> so much heat. I bet one of those threads ends up busy looping because of
> other brokenness.
My laptop was a lot happier when I removed the GPE _L00 method from my
DSDT which was busylooping sending a processor 0x80 event.
Faye
--
Faye Pearson,
Covert Development
ClaraNET Ltd. Tel 020 7903 3000
Familiarity breeds contempt -- and children.
-- Mark Twain