Date: Mon, 30 Jul 2007 23:31:33 +0200 From: Pietro Cerutti <gahr@gahr.ch> To: Kris Kennaway <kris@obsecurity.org>, freebsd-hackers@freebsd.org Subject: Re: [patch] enhance powerd(8) to handle max temperature Message-ID: <46AE58B5.3080506@gahr.ch> In-Reply-To: <20070730180355.GA7355@rot26.obsecurity.org> References: <46AA0491.5000203@gahr.ch> <yge7iol6zb8.wl%ume@mahoroba.org> <46ADAF5B.6050602@gahr.ch> <20070730180355.GA7355@rot26.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig30F02C0579D2AF348E0B65D4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Kris Kennaway wrote: > On Mon, Jul 30, 2007 at 11:28:59AM +0200, Pietro Cerutti wrote: >> Hajimu UMEMOTO wrote: >>> Hi, >>> >>>>>>>> On Fri, 27 Jul 2007 16:43:29 +0200 >>>>>>>> Pietro Cerutti <gahr@gahr.ch> said: >>> gahr> Hi list, >>> gahr> here is a patch to allow powerd(8) accept a "-t tval" option to= set a >>> gahr> temperature limit above which performance should be decreased. >>> gahr> It's a first draft, and I identified the following problems: >>> >>> gahr> - the CPU temperature takes some time to decrease, so powerd ke= eps >>> gahr> decreasing the CPU frequency until the temperature is below the= limit. >>> gahr> The effect is a "increase to maximum, decrease to minimum, incr= ease to >>> gahr> maximum, decrease to minimum, ...." which may not be desirable.= >>> >>> gahr> - the temperature is retrieved by the hw.acpi.thermal.tz0.tempe= rature >>> gahr> sysctl MIB. Support for other methods would be desirable. >>> >>> gahr> The patches to powerd.c and powerd.8 are here: >>> gahr> http://www.gahr.ch/FreeBSD/patches/powerd.c.diff >>> gahr> http://www.gahr.ch/FreeBSD/patches/powerd.8.diff >>> >>> gahr> Any comment is welcome! >>> >>> We have a passive cooling mechanism already in our kernel. It runs >>> according to an ACPI specification. >> You are right, but the passive colling mechanism could not be availabl= e >> on some systems where thermal is available, and I'm still waiting for >> answers about acpi_thermal not sending notifies. >> See my previous post: >> http://lists.freebsd.org/pipermail/freebsd-hackers/2007-July/021361.ht= ml >> >> What's wrong with including this feature directly in powerd? >=20 > In general duplication is undesirable. You should focus on trying to > solve the problems with using the ACPI method. For example, the acpi > passive cooling probably uses a better algorithm than your patches, > e.g. including appropriate hysteresis. Hi Kris, I agree with you in that duplication is undesirable. But isn't having both powerd and passive cooling dealing with CPU frequency control already a form of duplication? I can't test it, since I can't use passive cooling, but how do not these two systems interfere with each other wrt setting the CPU frequency? What if, for example, my CPU temperature rises above _PSV but the CPU usage drops below 65%? In this case, the CPU frequency should be increased according to powerd's algorithm and should be decreased according to passive cooling's algorithm. Wouldn't it be better to have one subsystem deal with both usage and temperature in order to decide which is the best next frequency to be set= ? My patch is really just a first draft that I wrote in order to have feedbacks on the general idea to implement a temperature controlling system inside powerd, and doesn't implement hysteresis as you noted, and your feedback is that it's not a good idea, which I respect. Given the above, would you like to elaborate? Thank you for your time! >=20 > Kris > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg" --=20 Pietro Cerutti PGP Public Key: http://gahr.ch/pgp --------------enig30F02C0579D2AF348E0B65D4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGrli5wMJqmJVx944RCvkKAJ9FpmnLLiooL9Lb4npx+UtQ5yjxTwCgor4B o7IpOjrInyW4MnLowA03aNg= =F5LC -----END PGP SIGNATURE----- --------------enig30F02C0579D2AF348E0B65D4--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46AE58B5.3080506>