Re: [PATCH] powerpc: fix wrong divisor in usecs_to_cputime
From: Andreas Schwab <hidden>
Date: 2011-12-09 23:43:01
Anton Blanchard [off-list ref] writes:
Hi Andreas,quoted
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: <redacted> [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@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."