public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sched/cputime: sig->prev_stime underflow
@ 2013-04-04 17:40 Dave Hansen
  2013-04-04 23:41 ` Frederic Weisbecker
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Hansen @ 2013-04-04 17:40 UTC (permalink / raw)
  To: linux-kernel, Ingo Molnar, Peter Zijlstra, Hidetoshi Seto

With the 3.9-rcs (and probably much earlier) I'm seeing some weird top
output where the cpu time "spent" is millions of hours:

445 root      20   0     0    0    0 S    0  0.0  5124095h kworker/45:1
404 root      20   0     0    0    0 S    0  0.0  5124095h kworker/4:1

I see it mostly with kernel threads, but it doesn't seem to happen on my
distro kernel (3.5 era).  The suspect code is in thread_group_times():

	sig->prev_stime = max(sig->prev_stime, rtime - sig->prev_utime);

In my case, I caught it with rtime=34 and sig->prev_utime=35.  This code
_looks_ to be pretty mature, coming in at commit 0cf55e1e in 2009.  The
system I'm running on _does_ have some non-sync'd TSCs, but they are at
least being detected, so I expect the fallout to be minimal:

	tsc: Marking TSC unstable due to check_tsc_sync_source failed

config:

	http://sr71.net/~dave/linux/config-bigbox-04042013.txt

The dumb fix here would seem to be to just check "rtime <
sig->prev_utime".  Any thoughts?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-05-03 10:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 17:40 sched/cputime: sig->prev_stime underflow Dave Hansen
2013-04-04 23:41 ` Frederic Weisbecker
2013-04-08 15:57   ` Dave Hansen
2013-04-11  7:45     ` Stanislaw Gruszka
2013-04-11 18:47       ` Dave Hansen
2013-04-16 11:06         ` Stanislaw Gruszka
2013-04-16 21:05           ` Dave Hansen
2013-04-30 12:36             ` Stanislaw Gruszka
2013-05-02 16:05               ` Dave Hansen
2013-05-03 11:00                 ` Stanislaw Gruszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox