From: Dave Hansen <dave@sr71.net>
To: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Subject: sched/cputime: sig->prev_stime underflow
Date: Thu, 04 Apr 2013 10:40:16 -0700 [thread overview]
Message-ID: <515DBB00.20208@sr71.net> (raw)
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?
next reply other threads:[~2013-04-04 17:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 17:40 Dave Hansen [this message]
2013-04-04 23:41 ` sched/cputime: sig->prev_stime underflow 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=515DBB00.20208@sr71.net \
--to=dave@sr71.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=seto.hidetoshi@jp.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox