From: Yury Polyanskiy <ypolyans@princeton.edu>
To: john stultz <johnstul@us.ibm.com>
Cc: Joel Becker <Joel.Becker@oracle.com>,
linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Jan Glauber <jan.glauber@de.ibm.com>
Subject: Re: [PATCH] hangcheck-timer is broken on x86
Date: Mon, 29 Mar 2010 17:08:28 -0400 [thread overview]
Message-ID: <ea182b21003291408t5a4fe8a8l47c0041df043a3a9@mail.gmail.com> (raw)
In-Reply-To: <1269888291.3968.5.camel@localhost.localdomain>
>> > What I'm saying is that if you're using getrawmonotonic() to detect
>> > hangs, you might miss them, as getrawmonotonic may wrap (and thus stop
>> > continually increasing) if the timer interrupt is delayed. This does not
>> > apply to systems using the TSC clocksource, but does apply to systems
>> > using the acpi_pm.
>>
>> But if timer interrupt is delayed by more than acpi_pm wrap-around
>> time, then the update_wall_time() is also screwed. Since it is not, we
>> can rely on getrawmonotonic().
>
> Right, if the box hangs for longer then the clocksource can count for,
> the timekeeping subsystem will be off by some multiple of that length.
>
Oh, I see. You mean that getrawmonotonic() wouldn't work under
abnormal conditions. I understand now, sorry for the confusion. You
are correct, of course.
I personally don't like the idea of relying on read_persistent_clock()
not only because of hwclock and ntp. In fact, my core interest in
hangcheck-timer is to set a very low margin (1 to 3 jiffies for
example) so that I would get a log message upon any kernel slow down
or a tick-miss (as a hardware integrity check). I don't think
read_persistent_clock() is precise enough for this purpose, is it?
Also, hooking to ntp update code complicates an otherwise simple
driver. I propose to simply check on non-S390 if the clock source
resolves to something other than TSC and dump a warning message on
driver load (something like "Hangcheck: kernel using clocksource %s,
which is not reliable for hang detection").
What do you think about it?
Thanks,
Yury
next prev parent reply other threads:[~2010-03-29 21:08 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-24 3:36 [PATCH] hangcheck-timer is broken on x86 Yury Polyanskiy
2010-03-26 21:24 ` Andrew Morton
2010-03-26 21:52 ` Yury Polyanskiy
2010-03-26 21:46 ` Joel Becker
2010-03-26 22:00 ` Yury Polyanskiy
2010-03-27 0:57 ` Joel Becker
2010-03-27 2:02 ` Yury Polyanskiy
2010-03-27 22:03 ` Joel Becker
2010-03-27 22:51 ` Yury Polyanskiy
2010-03-27 23:36 ` Joel Becker
2010-03-28 2:08 ` Yury Polyanskiy
2010-03-29 1:00 ` john stultz
2010-03-29 14:11 ` Yury Polyanskiy
2010-03-29 16:43 ` john stultz
2010-03-29 17:04 ` Yury Polyanskiy
2010-03-29 18:44 ` john stultz
2010-03-29 19:53 ` Joel Becker
2010-03-29 21:08 ` Yury Polyanskiy [this message]
2010-03-29 21:43 ` john stultz
2010-03-29 22:34 ` Yury Polyanskiy
2010-04-08 0:52 ` Joel Becker
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=ea182b21003291408t5a4fe8a8l47c0041df043a3a9@mail.gmail.com \
--to=ypolyans@princeton.edu \
--cc=Joel.Becker@oracle.com \
--cc=akpm@osdl.org \
--cc=jan.glauber@de.ibm.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).