From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 14 14:40:15 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 748D116A41F for ; Tue, 14 Mar 2006 14:40:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0701243D4C for ; Tue, 14 Mar 2006 14:40:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2EEeEve078943 for ; Tue, 14 Mar 2006 14:40:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2EEeEPc078942; Tue, 14 Mar 2006 14:40:14 GMT (envelope-from gnats) Date: Tue, 14 Mar 2006 14:40:14 GMT Message-Id: <200603141440.k2EEeEPc078942@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Craig Manley Cc: Subject: Re: bin/90903: [powerd] cpufreq inconsistency / powerd broken X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Craig Manley List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2006 14:40:15 -0000 The following reply was made to PR bin/90903; it has been noted by GNATS. From: Craig Manley To: bug-followup@FreeBSD.org, wiwi@progon.net Cc: Subject: Re: bin/90903: [powerd] cpufreq inconsistency / powerd broken Date: Tue, 14 Mar 2006 15:32:16 +0100 Hi, Could you please also add a sanity check after this block at line 50 in powerd.c where the current frequency is read and then all known frequencies in freqs are tested before entering the for (ever) loop later on. A warning is shown for those frequencies that fail to be set, and if 0 or 1 frequencies are good, then de daemon should croak with an appropriate warning. I've only got limited knowledge of C and don't know how to get this stuff patched or compiled myself otherwise I would, so forgive me on that. The reason why this additional sanity check is useful is because I've noticed that many people like me have more frequencies in the array than that can be set by sysctl. /* Check if we can read the idle time and supported freqs. */ if (read_usage_times(NULL, NULL)) err(1, "read_usage_times"); if (read_freqs(&numfreqs, &freqs, &mwatts)) err(1, "error reading supported CPU frequencies"); .... sanity check here .... .... leaving a fresh new numfreqs, freqs, and mwatts here ... Regards, Craig Manley