From: Len Brown <lenb@kernel.org>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] Fix polling policy in the absence of _TZP
Date: Tue, 13 May 2008 23:19:39 -0400 [thread overview]
Message-ID: <200805132319.39947.lenb@kernel.org> (raw)
In-Reply-To: <20080514010000.GB21608@srcf.ucam.org>
On Tuesday 13 May 2008, Matthew Garrett wrote:
> Fix Linux to conform to 11.3.18 of the ACPI spec 3.0. In the absence of
> a _TZP method, we should be polling at a default frequency. While it can
> be argued that "0" is a default frequency, I don't think that's what the
> spec authors had in mind.
Actually it is what the spec authors had in mind,
and the spec is wrong. Yes, I can provide documentation
supporting this statement.
NAK
thanks,
-Len
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
>
> ---
>
> Arguably this should be implemented in such a way that the polling rate
> increases as the temperature rises and drops if the trend is downwards.
> That would give higher resolution when we're heading towards a trip
> point, without any significant increase in power consumption since
> increased temperatures imply that the CPU is probably not idle.
>
> diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
> index 504385b..93cb3e8 100644
> --- a/drivers/acpi/thermal.c
> +++ b/drivers/acpi/thermal.c
> @@ -846,10 +846,11 @@ static void acpi_thermal_check(void *data)
> * Calculate Sleep Time
> * --------------------
> * If we're in the passive state, use _TSP's value. Otherwise
> - * use the default polling frequency (e.g. _TZP). If no polling
> - * frequency is specified then we'll wait forever (at least until
> - * a thermal event occurs). Note that _TSP and _TZD values are
> - * given in 1/10th seconds (we must covert to milliseconds).
> + * use the default polling frequency (e.g. _TZP). If no
> + * polling frequency is specified then we'll wait 10 seconds
> + * (or until a thermal event occurs). Note that _TSP and _TZD
> + * values are given in 1/10th seconds (we must covert to
> + * milliseconds).
> */
> if (tz->state.passive) {
> sleep_time = tz->trips.passive.tsp * 100;
> @@ -1575,8 +1576,9 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz)
> /* Get default polling frequency [_TZP] (optional) */
> if (tzp)
> tz->polling_frequency = tzp;
> - else
> - acpi_thermal_get_polling_frequency(tz);
> + else if (acpi_thermal_get_polling_frequency(tz) == -ENODEV)
> + /* If no _TZP, default to polling every 10 seconds */
> + tz->polling_frequency = 100;
>
> return 0;
> }
>
next prev parent reply other threads:[~2008-05-14 3:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 1:00 [PATCH] Fix polling policy in the absence of _TZP Matthew Garrett
2008-05-14 1:03 ` [PATCH 1/2] Add a list of processor objects to the ACPI core Matthew Garrett
2008-05-14 1:08 ` [PATCH 2/2] Add a passive cooling trip point if the firmware doesn't define one Matthew Garrett
2008-05-14 3:30 ` Len Brown
2008-05-14 9:33 ` Matthew Garrett
2008-05-14 15:37 ` Len Brown
2008-05-14 23:01 ` Matthew Garrett
2008-05-15 0:55 ` Zhang Rui
2008-05-15 1:04 ` Matthew Garrett
[not found] ` <1210814699.2929.10.camel@rzhang-crestline.sh.intel.com>
[not found] ` <20080515015831.GA14829@srcf.ucam.org>
2008-05-15 2:15 ` Zhang Rui
2008-05-15 2:24 ` Matthew Garrett
2008-05-15 3:06 ` Zhang Rui
2008-05-15 11:40 ` Matthew Garrett
2008-05-15 11:47 ` Andi Kleen
2008-05-15 12:02 ` Matthew Garrett
2008-05-14 3:19 ` Len Brown [this message]
2008-05-14 10:14 ` [PATCH] Fix polling policy in the absence of _TZP Matthew Garrett
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=200805132319.39947.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg59@srcf.ucam.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;
as well as URLs for NNTP newsgroup(s).