Re: PROBLEM: no cpu MHz in /proc/cpuinfo on 2.6.25.4-rt6

From: Kok, Auke
Date: Tue Jun 10 2008 - 16:43:46 EST


Arjan van de Ven wrote:
> On Tue, 10 Jun 2008 21:52:23 +0200
> solsTiCe d'Hiver <solstice.dhiver@xxxxxxxxx> wrote:
>
>> hi,
>>
>> i am running a 2.6.25.5-rt6 kernel.
>> i know there is no such thing as 2.6.25.5-rt6 yet. so i have checked
>> with a 2.6.25.4-rt6 kernel and i have the same issue.
>>
>> when i try to run jackd (0.109.2) i get that strange error:
>> FATAL: cannot locate cpu MHz in /proc/cpuinfo
>>
>> and it appears that /proc/cpuinfo lack the line
>> cpu MHz:
>
>
> btw this is scary; the Mhz line in /proc/cpuinfo doesn't have much
> meaning really, so applications using it and depending on it is a
> rather big disaster ;-(
>
> Does anyone know why jackd wants to use this?

I just poked into Jackd and it seems to be using fallback code to calculate timing
intervals from the cpu MHz value (config/os/gnu-linux/time.c).

the code itself is self-addmittedly a kludge:


122 /*
123 * This is another kludge. It looks CPU-dependent, but actually it
124 * reflects the lack of standards for the Linux kernel formatting of
125 * /proc/cpuinfo.
126 */
127
128 jack_time_t
129 jack_get_mhz (void)
130 {
131 FILE *f = fopen("/proc/cpuinfo", "r");

one kludge building on another :)


Auke

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/