[RFC] Patch to enable temperature ceiling in powerd
Ian Smith
smithi at nimnet.asn.au
Sat Feb 16 07:04:28 UTC 2008
On Fri, 15 Feb 2008, Alexandre "Sunny" Kovalenko wrote:
> On Sat, 2008-02-16 at 12:11 +0900, Hajimu UMEMOTO wrote:
> > Hi,
> >
> > >>>>> On Fri, 15 Feb 2008 20:41:10 -0500
> > >>>>> "Alexandre \"Sunny\" Kovalenko" <alex.kovalenko at verizon.net> said:
> >
> > alex> Thank you very much for pointing me in the right direction -- my system
> > alex> (ThinkPad X60 1709-73U) does provide _TSP, _TC1 and _TC2, just not in
> > alex> the tz0. All of that lives in tz1 and works perfectly -- as the matter
> > alex> of fact I am writing this E-mail after setting
> >
> > alex> hw.acpi.thermal.tz1.passive_cooling: 1
> > alex> hw.acpi.thermal.user_override: 1
> > alex> hw.acpi.thermal.tz1._PSV: 55.0C
> >
> > The current implementation attempts to enable passive cooling just for
> > tz0. Could you try the following patch? It should enable passive
> > cooling for tz1 on your laptop.
>
> Thank you, it certainly did:
>
> sunny:RabbitsDen>sysctl hw.acpi.thermal
> hw.acpi.thermal.min_runtime: 0
> hw.acpi.thermal.polling_rate: 10
> hw.acpi.thermal.user_override: 0
> hw.acpi.thermal.tz0.temperature: 65.0C
> hw.acpi.thermal.tz0.active: -1
> hw.acpi.thermal.tz0.passive_cooling: 0
> hw.acpi.thermal.tz0.thermal_flags: 0
> hw.acpi.thermal.tz0._PSV: -1
> hw.acpi.thermal.tz0._HOT: -1
> hw.acpi.thermal.tz0._CRT: 127.0C
> hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
> hw.acpi.thermal.tz1.temperature: 64.0C
> hw.acpi.thermal.tz1.active: -1
> ==> hw.acpi.thermal.tz1.passive_cooling: 1
> hw.acpi.thermal.tz1.thermal_flags: 0
> hw.acpi.thermal.tz1._PSV: 92.5C
> hw.acpi.thermal.tz1._HOT: -1
> hw.acpi.thermal.tz1._CRT: 97.0C
> hw.acpi.thermal.tz1._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
Cool. Or at least, not so hot. But I'm still curious .. if tz1 is your
CPU rather than tz0, what the heck then is your tz0, with its _CRT at
127C? What does acpi_ibm show for your various tzs?
> I have one question regarding this patch: it enables passive cooling for
> the thermal zone, which has _PSV, _TSP, _TC1 and _TC2. Isn't it
> necessary to also have _PSL in the thermal zone to have passive cooling?
My reading of section 11.5 in ACPI 3.0a seems to indicate that, unless
this applies?:
. If _PSV is defined and _PSL is not defined, then at least one devce in
thermal zone, as indicated by either the _TZD device list or devices'
_TZM objects, must support device performance states.
Good to see ume@ is onto all this .. however I still feel your patch may
come in handy for the numerous people who report thermal problems such
as blowing up during buildworlds before all this gets MFC'd to 7 and 6,
or even then for some of the weider BIOS and ACPI implementations, as at
least a usable workaround to get the new, er, world built .. and as
currently crafted, cannot hurt if it's not invoked.
cheers, Ian
> > Index: sys/dev/acpica/acpi_thermal.c
> > diff -u -p sys/dev/acpica/acpi_thermal.c.orig sys/dev/acpica/acpi_thermal.c
> > --- sys/dev/acpica/acpi_thermal.c.orig Wed Aug 23 21:29:55 2006
> > +++ sys/dev/acpica/acpi_thermal.c Mon Aug 28 00:35:49 2006
> > @@ -172,6 +172,8 @@ static int acpi_tz_override;
> > static struct proc *acpi_tz_proc;
> > ACPI_LOCK_DECL(thermal, "ACPI thermal zone");
> >
> > +static int acpi_tz_cooling_unit = -1;
> > +
> > static int
> > acpi_tz_probe(device_t dev)
> > {
> > @@ -205,17 +207,7 @@ acpi_tz_attach(device_t dev)
> > sc->tz_cooling_proc_running = FALSE;
> > sc->tz_cooling_active = FALSE;
> > sc->tz_cooling_updated = FALSE;
> > -
> > - /*
> > - * Always attempt to enable passive cooling for tz0. Users can enable
> > - * it for other zones manually for now.
> > - *
> > - * XXX We need to test if multiple zones conflict with each other
> > - * since cpufreq currently sets all CPUs to the given frequency whereas
> > - * it's possible for different thermal zones to specify independent
> > - * settings for multiple CPUs.
> > - */
> > - sc->tz_cooling_enabled = (device_get_unit(dev) == 0);
> > + sc->tz_cooling_enabled = FALSE;
> >
> > /*
> > * Parse the current state of the thermal zone and build control
> > @@ -309,16 +301,25 @@ acpi_tz_attach(device_t dev)
> > }
> > }
> >
> > - /* Create a thread to handle passive cooling for each zone if enabled. */
> > + /*
> > + * Create a thread to handle passive cooling for 1st zone which
> > + * has _PSV, _TSP, _TC1 and _TC2. Users can enable it for other
> > + * zones manually for now.
> > + *
> > + * XXX We enable only one zone to avoid multiple zones conflict
> > + * with each other since cpufreq currently sets all CPUs to the
> > + * given frequency whereas it's possible for different thermal
> > + * zones to specify independent settings for multiple CPUs.
> > + */
> > + if (acpi_tz_cooling_unit < 0 && acpi_tz_cooling_is_available(sc))
> > + sc->tz_cooling_enabled = TRUE;
> > if (sc->tz_cooling_enabled) {
> > - if (acpi_tz_cooling_is_available(sc)) {
> > - error = acpi_tz_cooling_thread_start(sc);
> > - if (error != 0) {
> > - sc->tz_cooling_enabled = FALSE;
> > - goto out;
> > - }
> > - } else
> > + error = acpi_tz_cooling_thread_start(sc);
> > + if (error != 0) {
> > sc->tz_cooling_enabled = FALSE;
> > + goto out;
> > + }
> > + acpi_tz_cooling_unit = device_get_unit(dev);
> > }
> >
> > /*
> >
> > Sincerely,
> >
> > --
> > Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
> > ume at mahoroba.org ume@{,jp.}FreeBSD.org
> > http://www.imasy.org/~ume/
> --
> Alexandre "Sunny" Kovalenko (ÐлекÑÐ°Ð½Ð´Ñ Ðоваленко)
>
>
More information about the freebsd-acpi
mailing list