From owner-freebsd-stable@FreeBSD.ORG Sat Apr 9 08:13:54 2011 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 535A7106564A for ; Sat, 9 Apr 2011 08:13:54 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id DC9FC8FC0A for ; Sat, 9 Apr 2011 08:13:53 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id 14CE795C08; Sat, 9 Apr 2011 09:57:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id J9pVVAU8wqKn; Sat, 9 Apr 2011 09:57:29 +0200 (CEST) Received: from danger-mbp.local (188-167-63-91.dynamic.chello.sk [188.167.63.91]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: danger@rulez.sk) by services.syscare.sk (Postfix) with ESMTPSA id CA94095BF6; Sat, 9 Apr 2011 09:57:29 +0200 (CEST) Message-ID: <4DA01168.8050704@FreeBSD.org> Date: Sat, 09 Apr 2011 09:57:28 +0200 From: Daniel Gerzo Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17pre) Gecko/20110331 Lanikai/3.1.10pre MIME-Version: 1.0 To: Alexander Motin References: <4D9EEDAF.3020803@rulez.sk> <4D9EF48C.9070907@FreeBSD.org> <4D9F2384.5000104@FreeBSD.org> <85cda6f83d328e67a552b2cd5758dbd3@rulez.sk> <4D9F4B58.3050104@FreeBSD.org> In-Reply-To: <4D9F4B58.3050104@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: stable@FreeBSD.org Subject: Re: powerd / cpufreq question X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2011 08:13:54 -0000 On 8.4.2011 19:52, Alexander Motin wrote: >> So, here is my attempt to implement it: >> http://danger.rulez.sk/powerd.diff >> Can you please review & comment? I should be able to commit it mysqlf if >> you consider it acceptable. It seems to work for me :) > > Looks fine, except that -f option have to be the first, that is not > obvious. Another moment -- I've noticed some load constants hardcoded > there. They should also be handled to make higher values to work properly. I tried to be more explicit in the error message which tries to emphasis the need to put it first. I don't know myself how it would be possible to code it so that the -f doesn't need to be first. Ideas? Do you mean the values around lines of 730 - 762? From what I have observed, if I have a machine that is a little more loaded (say 300%) and the load goes up, it tries to increases the performance to quite high freq (5336) and when the load decreases again, it takes quite a while to go down from 5366 to a frequency that is actually available to decrease the performance (something less than 2934). So the lower frequency is used for too short time because it takes too much time to get it... >> Seems like it was enabled by default. I have like these: >> dev.cpu.0.cx_supported: C1/3 C2/96 C3/128 >> >> Does that mean I only need to set these in rc.conf?: >> performance_cx_lowest="C3" >> economy_cx_lowest="C3" >> >> Then run /etc/rc.d/power_profile 0x00? > > It short - yes. In long - read the link I've given. > >> May it cause any instability? > > It you won't switch from LAPIC to other timer and it stop - your system > will freeze, or at least not work well. You should notice problems > immediately, if there are. So I will also need to change the kern.timecounter.hardware to i8254? I suppose it will cause a little less precise time, but should I expect lower performance? I don't care that much about the time accuracy. How do I know the C3 is active? And how does it switch back to C1 for example? >>>> This is 8-STABLE, any idea whether there's a MFC plan for the extra >>>> 9-CURRENT bonuses? >>> >>> I suppose around May. >> >> Do you have some patches? If not you don't really need to make them just >> for me, I can wait a little. > > Last ones I've generated are five months old: > http://people.freebsd.org/~mav/timers_merge/ > They are large and I am not sure how good they apply now. I guess I will just stick with vanilla 8-stable and then update. >>>>> You may want to look here: >>>>> http://wiki.freebsd.org/TuningPowerConsumption -- S pozdravom / Best regards Daniel Gerzo, FreeBSD committer