From: Samuel Rydh <samuel@ibrium.se>
To: linuxppc-dev@lists.linuxppc.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [PATCH] gettimeofday stability
Date: Wed, 11 Apr 2001 21:00:21 +0200 [thread overview]
Message-ID: <20010411210021.A4894@ibrium.se> (raw)
I'd like to suggest the following modification of do_gettimeofday():
===== time.c 1.8 vs edited =====
--- 1.8/arch/ppc/kernel/time.c Mon Apr 2 03:36:42 2001
+++ edited/time.c Wed Apr 11 20:38:42 2001
@@ -212,6 +212,10 @@
sec = xtime.tv_sec;
usec = xtime.tv_usec;
delta = tb_ticks_since(tb_last_stamp);
+
+ if( (int)delta < 0 )
+ delta = 0;
+
#ifdef CONFIG_SMP
/* As long as timebases are not in sync, gettimeofday can only
* have jiffy resolution on SMP.
Normally, delta should be strictly positive. However, if
coherency between DEC and TB is lost, then delta might turn
out to be (slightly) negative, which results in a
bogus time stamp.
The main reason why I want this modification is that MOL
touches both DEC and TB. I've not managed to maintain
exact coherency (appears to be more or less impossible).
The fix above would guard against an occasional drift.
/Samuel
----------------------------------------------------------
E-mail <samuel@ibrium.se> WWW: <http://www.ibrium.se>
Phone/fax: (home) +46 8 4418431, (work) +46 8 7908470
----------------------------------------------------------
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next reply other threads:[~2001-04-11 19:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-11 19:00 Samuel Rydh [this message]
2001-04-11 19:42 ` [PATCH] gettimeofday stability Gabriel Paubert
2001-04-11 20:09 ` Karim Yaghmour
2001-04-11 21:31 ` Benjamin Herrenschmidt
2001-04-12 18:09 ` Gabriel Paubert
2001-04-14 6:49 ` Karim Yaghmour
2001-04-16 11:56 ` Gabriel Paubert
2001-04-16 13:25 ` Benjamin Herrenschmidt
2001-04-16 12:53 ` Gabriel Paubert
2001-04-17 11:22 ` Gabriel Paubert
2001-04-11 23:07 ` Samuel Rydh
2001-04-16 11:25 ` Gabriel Paubert
2001-04-19 20:43 ` Samuel Rydh
2001-04-21 15:21 ` Gabriel Paubert
2001-04-21 18:16 ` Samuel Rydh
2001-04-21 19:37 ` Gabriel Paubert
-- strict thread matches above, loose matches on Subject: below --
2001-04-16 16:00 Iain Sandoe
2001-04-16 22:19 ` Dan Malek
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=20010411210021.A4894@ibrium.se \
--to=samuel@ibrium.se \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.linuxppc.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).