bin/90903: [powerd] cpufreq inconsistency / powerd broken

Craig Manley cmanley at xs4all.nl
Tue Mar 14 14:40:15 UTC 2006


The following reply was made to PR bin/90903; it has been noted by GNATS.

From: Craig Manley <cmanley at xs4all.nl>
To: bug-followup at FreeBSD.org, wiwi at 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
    


More information about the freebsd-bugs mailing list