Bug 23652
Summary: | procfs: /proc/<pid>/stat utime stops incrementing, stime starts incrementing | ||
---|---|---|---|
Product: | File System | Reporter: | Mark Stemm (mstemm) |
Component: | Other | Assignee: | fs_other |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | alan, justincase |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.32-25-generic | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Mark Stemm
2010-11-23 18:23:50 UTC
I have reproduced the same kind of problem with a Linux 2.6.34: Linux controlblade 2.6.34.7-ELinOS-189-Noah #1 SMP PREEMPT Fri Aug 3 16:33:41 CEST 2012 i686 unknown I have made a small program that is using both user and system CPU. After several seconds, the CPU user time is stalled to 0 and the CPU system is counting both the time spent by system and user: Loop 71, at 1344008485, CPU user time=414100 (delta=5600), system time=457100 (delta=6500), delta sum=12100 Loop 72, at 1344008486, CPU user time=419800 (delta=5700), system time=463600 (delta=6500), delta sum=12200 Loop 73, at 1344008487, CPU user time=425600 (delta=5800), system time=469900 (delta=6300), delta sum=12100 Loop 74, at 1344008488, CPU user time=431100 (delta=5500), system time=476500 (delta=6600), delta sum=12100 Loop 75, at 1344008489, CPU user time=437100 (delta=6000), system time=482700 (delta=6200), delta sum=12200 Loop 76, at 1344008491, CPU user time=442800 (delta=5700), system time=489100 (delta=6400), delta sum=12100 Loop 77, at 1344008492, CPU user time=448600 (delta=5800), system time=495500 (delta=6400), delta sum=12200 Loop 78, at 1344008493, CPU user time=448600 (delta=0), system time=507600 (delta=12100), delta sum=12100 Loop 79, at 1344008494, CPU user time=448600 (delta=0), system time=519800 (delta=12200), delta sum=12200 Loop 80, at 1344008496, CPU user time=448600 (delta=0), system time=531900 (delta=12100), delta sum=12100 So to be more precised, it seems that after a certain period (or may be when CPU user time reaches a certain value), the CPU user time is counted as system time instead of user time. Not reproducable on modern kernels with the code example - corrected for the warnings (gcc -Wall) |