Re: [patch] perf timechart: Add a power-only mode

From: Arjan van de Ven
Date: Thu Sep 24 2009 - 09:51:01 EST


On Thu, 24 Sep 2009 15:47:01 +0200
Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:

> > - for (cpu = 0; cpu < numcpus; cpu++) {
> > + for (cpu = 0; cpu <= numcpus; cpu++) {
>
> hmm, why test is now "cpu <= numcpus" ?

at this point numcpus is the highest number cpu...
and the graph would miss the "closing" frequency.


> > fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies",
> > "r");
>
> if this cpu is offline

1) taking cpu 0 offline is stupid ;-)
(really, don't do that, there's only bad things to come from it)
2) if that file does not exist the fallback is graceful, we just use
the highest frequency we saw in the trace instead.

>
> /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies:
> No such file or directory

--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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/