elapsed times wrap
Quoted 17 lines · Hugh Dickins
Quoted 8 lines · Kai Germaschewski
Quoted 3 lines · Hugh Dickins
Userspace shows huge elapsed time across jiffies wrap:
withUSER_HZless then HZ,sys_timesneedsjiffies_64to calculate its retval.That makes me wonder, aren't all uses of
jiffies_to_clock_t()broken then?I believe you're right, but it's less obvious to me that the other uses really want fixing e.g. would we be happy to maintain utime,stime,cutime,cstime as 64-bit on a 32-bit machine?
Quoted 1 line
Well, all which take an absolute time as an argument at least.
Quoted 7 lines
Yes, it's much more important to fix those where userspace habitually takes the difference. That certainly applies to the return value from
sys_times, but I don't see any other cases as clear (though userspace may have good reason to take the difference of any of them).Perhaps a procps expert can advise?
That depends on how much you care about the problems. Some that come to mind:
The OOM killer will be more likely to kill the wrong process. CPU usage stats will be worthless junk.
On a 4-way box, you can hit troubles with cutime after just 2 weeks of usage.
Consider changing just cutime. It's the value most likely to wrap. Plain utime would be the second priority.