From: Pavel Machek <pavel@ucw.cz>
To: Jeff Garzik <jgarzik@pobox.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_os_queue_for_execution()
Date: Sun, 29 Dec 2002 19:11:46 +0100 [thread overview]
Message-ID: <20021229181146.GC16995@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20021228202716.GA28570@gtf.org>
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...
>
> This is the standard way to get process context [i.e. somewhere where
> you can sleep]. The new delayed-work workqueue code in 2.5.x does
> something almost exactly like that under the covers.
Is it really true that fork() can not sleep?
> That said, it sounds like you found something to fix in ACPI:
>
> In 2.4.x ACPI, it should be using schedule_task(), and in 2.5.x it should
> be using schedule_work(), if this is truly the intention of the ACPI
> subsystem.
Agreed.
Pavel
--
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.
prev parent reply other threads:[~2002-12-29 18:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-23 18:17 acpi_os_queue_for_execution() Pavel Machek
2002-12-28 20:27 ` acpi_os_queue_for_execution() Jeff Garzik
2002-12-29 18:11 ` Pavel Machek [this message]
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=20021229181146.GC16995@atrey.karlin.mff.cuni.cz \
--to=pavel@ucw.cz \
--cc=acpi-devel@lists.sourceforge.net \
--cc=jgarzik@pobox.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
all inboxes | Powered by JetHome®