Re: /proc/stat information incorrect

From: Martin Schwidefsky
Date: Mon Apr 16 2012 - 08:36:18 EST


On Mon, 16 Apr 2012 10:04:48 +0200
Bas van der Oest <bassvdo@xxxxxxxxx> wrote:

> After dropping some zero columns and taking the difference between the
> statistics the reformatted result is:
>    Âuser  Ânice  Âsystem Âidle  Âiowait Âirq   softirq sum
> cpu   5    0    434   7676  Â0    0    53   Â8168
> cpu0 Â Â0 Â Â Â 0 Â Â Â 0 Â Â Â 1067 Â Â0 Â Â Â 0 Â Â Â 0 Â Â Â 1067
> cpu1 Â Â0 Â Â Â 0 Â Â Â 1 Â Â Â 1070 Â Â0 Â Â Â 0 Â Â Â 0 Â Â Â 1071
> cpu2 Â Â0 Â Â Â 0 Â Â Â 0 Â Â Â 1071 Â Â0 Â Â Â 0 Â Â Â 0 Â Â Â 1071
> cpu3 Â Â1 Â Â Â 0 Â Â Â 0 Â Â Â 1070 Â Â0 Â Â Â 0 Â Â Â 0 Â Â Â 1071
> cpu4 Â Â1 Â Â Â 0 Â Â Â 94 Â Â Â974 Â Â 0 Â Â Â 0 Â Â Â 0 Â Â Â 1069
> cpu5 Â Â2 Â Â Â 0 Â Â Â 92 Â Â Â535 Â Â 0 Â Â Â 0 Â Â Â 52 Â Â Â681
> cpu6 Â Â0 Â Â Â 0 Â Â Â 82 Â Â Â987 Â Â 0 Â Â Â 0 Â Â Â 0 Â Â Â 1069
> cpu7 Â Â1 Â Â Â 0 Â Â Â 165 Â Â 905 Â Â 0 Â Â Â 0 Â Â Â 0 Â Â Â 1071
>
> I added a sum column which totals the time spent in the different
> modes. The above table now shows how long each CPU was in what mode
> for how long.
> Now I am wondering how it is possible that CPU5 has spent much less
> time than all the other CPUs. I expected that all CPUs spent around
> the same time (10s). This time includes idle time so this is not
> related to the difference in active/idle CPUs.
>
> I know for a fact that this effect is related to which CPU is handling
> my IRQs; this effect happens to all CPUs if I map the interrupts to
> that particular CPU.
> I looked up the scheduler's statistics handling in the kernel source
> but was not able to find any cause for the above mentioned effect.
>
> Can anyone reproduce this behaviour?
> Does anyone know where/what might be the cause of this?

Assuming that you are on a recent kernel (>= 3.2), could you please
try to revoke git commit a25cac5198d4ff28 "proc: Consider NO_HZ when
printing idle and iowait times" and try again ?

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
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/