From: dwalker@fifo99.com (Daniel Walker)
To: linux-arm-kernel@lists.infradead.org
Subject: Q: sched_clock() vs. clocksource, how to implement correctly
Date: Mon, 26 Apr 2010 16:48:14 -0700 [thread overview]
Message-ID: <1272325694.32741.16.camel@c-dwalke-linux.qualcomm.com> (raw)
In-Reply-To: <20100423182933.0df45b53@mschwide.boeblingen.de.ibm.com>
On Fri, 2010-04-23 at 18:29 +0200, Martin Schwidefsky wrote:
> > Questions:
> >
> > - Isn't sched_clock() supposed to be extended to 64bit so
> > that it practically never wraps?
> > (old implementations use cnt32_to_63())
>
> Yes, sched_clock() is supposed to return a monotonic timestamp.
>
> > - What would be the effect on scheduling when sched_clock() wraps?
>
> It would confuse the process accounting and the scheduling I guess.
>
Are you sure about this? I'm pretty sure I've seen Ingo say multiple
times that sched_clock can wrap, and can be unstable. For instance
sched_clock is (was?) directly connected to the TSC on x86 ..
If it really can't wrap there must bunches of architectures that would
need to be fixed up.
Daniel
prev parent reply other threads:[~2010-04-26 23:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 15:09 Q: sched_clock() vs. clocksource, how to implement correctly Johannes Stezenbach
2010-04-23 16:29 ` Martin Schwidefsky
2010-04-24 20:50 ` Johannes Stezenbach
2010-04-25 14:36 ` Peter Zijlstra
2010-04-26 13:18 ` Johannes Stezenbach
2010-04-26 23:48 ` Daniel Walker [this message]
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=1272325694.32741.16.camel@c-dwalke-linux.qualcomm.com \
--to=dwalker@fifo99.com \
--cc=linux-arm-kernel@lists.infradead.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).