From: Andrew Morton <akpm-LL/9OlyS9hIAvxtiuMwx3w@public.gmane.org>
To: "Grover, Andrew" <andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
ACPI mailing list
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
kernel list
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [ACPI] acpi_os_queue_for_execution()
Date: Mon, 06 Jan 2003 03:44:23 -0800 [thread overview]
Message-ID: <3E196C17.7D318CAF@digeo.com> (raw)
In-Reply-To: F760B14C9561B941B89469F59BA3A84725A107@orsmsx401.jf.intel.com
"Grover, Andrew" wrote:
>
> > From: Pavel Machek [mailto:pavel-+ZI9xUNit7I@public.gmane.org]
> > 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.
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@digeo.com>
To: "Grover, Andrew" <andrew.grover@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>,
ACPI mailing list <acpi-devel@lists.sourceforge.net>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [ACPI] acpi_os_queue_for_execution()
Date: Mon, 06 Jan 2003 03:44:23 -0800 [thread overview]
Message-ID: <3E196C17.7D318CAF@digeo.com> (raw)
In-Reply-To: F760B14C9561B941B89469F59BA3A84725A107@orsmsx401.jf.intel.com
"Grover, Andrew" wrote:
>
> > From: Pavel Machek [mailto:pavel@ucw.cz]
> > 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.
next prev parent reply other threads:[~2003-01-06 11:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 19:00 [ACPI] acpi_os_queue_for_execution() Grover, Andrew
2003-01-03 19:00 ` Grover, Andrew
[not found] ` <F760B14C9561B941B89469F59BA3A84725A107-sBd4vmA9Se4Lll3ZsUKC9FDQ4js95KgL@public.gmane.org>
2003-01-04 22:44 ` Matthew Wilcox
2003-01-04 22:44 ` Matthew Wilcox
2003-01-05 12:23 ` Ingo Oeser
2003-01-05 12:23 ` Ingo Oeser
2003-01-06 11:12 ` Pavel Machek
2003-01-06 11:12 ` Pavel Machek
2003-01-06 11:44 ` Andrew Morton [this message]
2003-01-06 11:44 ` Andrew Morton
[not found] ` <3E196C17.7D318CAF-LL/9OlyS9hIAvxtiuMwx3w@public.gmane.org>
2003-01-06 12:58 ` Andrew McGregor
2003-01-06 12:58 ` Andrew McGregor
[not found] ` <20150000.1041857884-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2003-01-06 17:26 ` Faye Pearson
2003-01-06 17:26 ` Faye Pearson
-- strict thread matches above, loose matches on Subject: below --
2003-01-07 14:23 peter.holmes
2003-01-08 9:47 ` Faye Pearson
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=3E196C17.7D318CAF@digeo.com \
--to=akpm-ll/9olys9hiavxtiumwx3w@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pavel-+ZI9xUNit7I@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.