From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: john stultz <johnstul@us.ibm.com>,
lkml <linux-kernel@vger.kernel.org>,
Tim Schmielau <tim@physik3.uni-rostock.de>,
George Anzinger <george@mvista.com>,
albert@users.sourceforge.net,
Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>,
Dominik Brodowski <linux@dominikbrodowski.de>,
David Mosberger <davidm@hpl.hp.com>, Andi Kleen <ak@suse.de>,
Paul Mackerras <paulus@samba.org>,
schwidefsky@de.ibm.com, keith maanthey <kmannth@us.ibm.com>,
Patricia Gaughen <gone@us.ibm.com>,
Chris McDermott <lcm@us.ibm.com>, Max Asbock <amax@us.ibm.com>,
mahuja@us.ibm.com, Nishanth Aravamudan <nacc@us.ibm.com>,
Darren Hart <darren@dvhart.com>,
"Darrick J. Wong" <djwong@us.ibm.com>,
Anton Blanchard <anton@samba.org>
Subject: Re: [RFC][PATCH] new timeofday arch specific hooks (v. A2)
Date: Wed, 26 Jan 2005 14:29:05 +1100 [thread overview]
Message-ID: <1106710145.5235.47.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.58.0501251620100.27922@schroedinger.engr.sgi.com>
On Tue, 2005-01-25 at 16:34 -0800, Christoph Lameter wrote:
> I just hope that the implementation of one arch does not become a standard
> without sufficient reflection. Could we first get an explanation of
> the rationale of the offsets? From my viewpoint of the ia64 implementation
> I have some difficulty understanding why such complicated things as
> prescale and postscale are necessary in gettimeday and why the simple
> formula that we use in gettimeofday is not sufficient?
What is complicated here ? The formula, at least as we do on ppc64, is
simply:
time = (hw_value - prescale offset) / scale + post scale offset
Please, don't tell me that a substraction bothers you for performances,
and this first offset, while it could maybe be "folded" into the second
one, is actually handy, especially since it allows you to keep the
(hw_value - prescale offset) in a 32 bits number if your HW timebase
isn't too fast.
Now, for the details, on ppc, we calculate time in what we call "xsecs"
which is 2^20 xsec/sec, so not exactly micro or nanoseconds, but that's
also for simplifying calculations, we may want the generic code to just
fallback on to ns.
> Frankly, the direction that the design of the new time subsystem is
> taking is bothering me. Work on this on our part would just improve the
> situation from drastically worse performance to somewhat worse. So far I
> have not seen a benefit of moving away from the existing code base. For
> the project to make sense it needs at least to be evident that the design
> of the solution would lead to better timer performance in the long run.
> Conceptually that seems so far not to be possible.
The main problem with performances in the new code is the fact that it
does the ntp correction on every call. John is aware that it is a
problem and will fix that.
> I'd love simplication of the timer subsystem through the use of
> nanosecond offsets. However, the POSIX api always has extra fields
> for seconds and nanoseconds and converting back and forth between the
> internal representation in 64bit nanoseconds and the POSIX structures may
> be another performance penalty since it involves divisions and remainder
> processing.
>
> What I think is a priority need is some subsystem that manages
> time sources effectively (including the ability of the ntp code to
> scale the appropriately) and does that in an arch independent
> way so that all the code can be consolidated. Extract the best existing
> solutions and work from there.
Which is what John is trying to do, so help instead of criticizing :)
Ben.
next prev parent reply other threads:[~2005-01-26 3:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-24 22:51 [RFC][PATCH] new timeofday core subsystem (v. A2) john stultz
2005-01-24 22:52 ` [RFC][PATCH] new timeofday arch specific hooks " john stultz
2005-01-24 22:53 ` [RFC][PATCH] new timeofday arch specific timesources " john stultz
2005-01-24 23:29 ` Christoph Lameter
2005-01-25 0:04 ` john stultz
2005-01-25 2:28 ` [RFC][PATCH] new timeofday arch specific hooks " Benjamin Herrenschmidt
2005-01-25 23:09 ` john stultz
2005-01-25 23:53 ` Benjamin Herrenschmidt
2005-01-26 0:17 ` john stultz
2005-01-26 0:34 ` Christoph Lameter
2005-01-26 3:29 ` Benjamin Herrenschmidt [this message]
2005-01-26 16:51 ` Christoph Lameter
2005-01-26 3:14 ` Benjamin Herrenschmidt
2005-01-24 23:24 ` [RFC][PATCH] new timeofday core subsystem " Christoph Lameter
2005-01-25 0:03 ` john stultz
2005-01-25 0:08 ` Christoph Lameter
2005-01-25 0:33 ` john stultz
2005-01-25 1:54 ` Christoph Lameter
2005-01-25 7:50 ` Ulrich Windl
2005-01-25 12:25 ` Tim Schmielau
2005-01-25 7:41 ` Ulrich Windl
2005-01-25 8:17 ` Andi Kleen
2005-01-25 23:18 ` john stultz
2005-02-01 22:06 ` Tim Bird
2005-02-01 22:48 ` john stultz
2005-02-01 23:14 ` Nigel Cunningham
2005-02-01 23:32 ` john stultz
2005-02-02 0:04 ` Nigel Cunningham
2005-02-02 0:27 ` john stultz
2005-02-02 0:36 ` Nigel Cunningham
2005-02-01 23:53 ` Tim Bird
2005-02-02 0:19 ` john stultz
2005-02-02 1:48 ` Tim Bird
2005-02-02 2:00 ` john stultz
2005-02-02 2:23 ` Nigel Cunningham
[not found] <OFF640EFCB.17A81893-ON41256F95.0033EA1D-41256F95.00342F11@de.ibm.com>
2005-01-26 16:52 ` [RFC][PATCH] new timeofday arch specific hooks " Christoph Lameter
2005-01-26 17:51 ` David Mosberger
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=1106710145.5235.47.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=ak@suse.de \
--cc=albert@users.sourceforge.net \
--cc=amax@us.ibm.com \
--cc=anton@samba.org \
--cc=clameter@sgi.com \
--cc=darren@dvhart.com \
--cc=davidm@hpl.hp.com \
--cc=djwong@us.ibm.com \
--cc=george@mvista.com \
--cc=gone@us.ibm.com \
--cc=johnstul@us.ibm.com \
--cc=kmannth@us.ibm.com \
--cc=lcm@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.de \
--cc=mahuja@us.ibm.com \
--cc=nacc@us.ibm.com \
--cc=paulus@samba.org \
--cc=schwidefsky@de.ibm.com \
--cc=tim@physik3.uni-rostock.de \
--cc=ulrich.windl@rz.uni-regensburg.de \
/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