[PATCH] powerpc: fix wrong divisor in usecs_to_cputime

Andreas Schwab schwab at linux-m68k.org
Sat Dec 10 10:42:56 EST 2011


Anton Blanchard <anton at samba.org> writes:

> Hi Andreas,
>
>> Commit d57af9b (taskstats: use real microsecond granularity for CPU
>> times) renamed msecs_to_cputime to usecs_to_cputime, but failed to
>> update all numbers on the way.  This causes nonsensical cpu
>> idle/iowait values to be displayed in /proc/stat (the only user of
>> usecs_to_cputime so far).
>> 
>> This also renames __cputime_msec_factor to __cputime_usec_factor,
>> adapting its value and using it directly in cputime_to_usecs instead
>> of doing two multiplications.
>
> Thanks for finding this! I noticed the strange behaviour yesterday and
> was just about to investigate.
>
> Can I suggest we add: 
>
> Cc: <stable at vger.kernel.org> [2.6.37+]
>
> so it will make it back into the stable trees?

There is no user of usecs_to_cputime before 3.2-rc1, so it wouldn't have
any effect for older versions.

Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


More information about the Linuxppc-dev mailing list