From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Scott Wood <scottwood@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/timebase_read: don't return time older than cycle_last
Date: Wed, 29 Jun 2011 09:25:08 +1000 [thread overview]
Message-ID: <1309303508.32158.473.camel@pasglop> (raw)
In-Reply-To: <20110628111420.15052d9f@schlenkerla.am.freescale.net>
On Tue, 2011-06-28 at 11:14 -0500, Scott Wood wrote:
> > You are applying a bandage on a wooden leg here .... userspace (vDSO)
> > will see the time going backward if you aren't well synchronized as
> > well, so you're stuffed anyways.
>
> Sure -- but we should avoid turning a slight backwards drift into a huge
> positive offset in the kernel's calculations. One way to do that is for
> the generic timekeeping code to be robust against this, for all time
> sources. The other is to apply this sort of hack on time sources that are
> known to possibly go backwards. The former is the better fix IMHO, but the
> latter is what was already done for TSC on x86, so I went with the less
> intrusive change.
Ok two things. One is first fix the comments then to stop mentioning
"TSC" :-)
Second is, I still don't think it's right. There's an expectation on
powerpc that the timebase works properly. If not, you have a userspace
visible breakage. There's no such thing as "a small drift". We assume no
difference is visible to software, period. We make hard assumptions here
and in various places actually.
So if you want to do that test, I would require that you also add a
warning, of the _rate_limited or _once, kind, indicating to the user
that something's badly wrong.
Cheers,
Ben.
next prev parent reply other threads:[~2011-06-28 23:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-27 21:56 [PATCH] powerpc/timebase_read: don't return time older than cycle_last Scott Wood
2011-06-28 0:45 ` Benjamin Herrenschmidt
2011-06-28 16:14 ` Scott Wood
2011-06-28 23:25 ` Benjamin Herrenschmidt [this message]
2011-06-29 0:08 ` Scott Wood
2011-06-29 1:06 ` Benjamin Herrenschmidt
2011-06-29 19:19 ` Scott Wood
2011-06-30 0:29 ` Benjamin Herrenschmidt
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=1309303508.32158.473.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=scottwood@freescale.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;
as well as URLs for NNTP newsgroup(s).