mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: john stultz <johnstul@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	tim@physik3.uni-rostock.de, george anzinger <george@mvista.com>,
	albert@users.sourceforge.net, Ulrich.Windl@rz.uni-regensburg.de,
	linux@dominikbrodowski.de, David Mosberger <davidm@hpl.hp.com>,
	Andi Kleen <ak@suse.de>,
	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 <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 core subsystem (v. A2)
Date: Mon, 24 Jan 2005 15:24:50 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0501241513470.17986@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <1106607089.30884.10.camel@cog.beaverton.ibm.com>

On Mon, 24 Jan 2005, john stultz wrote:

> +/* __monotonic_clock():
> + *		private function, must hold system_time_lock lock when being
> + *		called. Returns the monotonically increasing number of
> + *		nanoseconds	since the system booted (adjusted by NTP scaling)
> + */
> +static nsec_t __monotonic_clock(void)
> +{
> +	nsec_t ret, ns_offset;
> +	cycle_t now, delta;
> +
> +	/* read timesource */
> +	now = read_timesource(timesource);
> +
> +	/* calculate the delta since the last clock_interrupt */
> +	delta = (now - offset_base) & timesource->mask;
> +
> +	/* convert to nanoseconds */
> +	ns_offset = cyc2ns(timesource, delta, NULL);
> +
> +	/* apply the NTP scaling */
> +	ns_offset = ntp_scale(ns_offset);

The monotonic clock is the time base for the gettime and gettimeofday
functions. This means ntp_scale() is called every time that the kernel or
an application access time.

As pointed out before this will dramatically worsen the performance
compared to the current code base.

ntp_scale() also will make it difficult to implement optimized arch
specific version of function for timer access.

The fastcalls would have to be disabled on ia64 to make this work. Its
likely extremely difficult to implement a fastcall if it involves
ntp_scale().


  parent reply	other threads:[~2005-01-24 23:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-24 22:51 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
2005-01-26 16:51               ` Christoph Lameter
2005-01-26  3:14           ` Benjamin Herrenschmidt
2005-01-24 23:24 ` Christoph Lameter [this message]
2005-01-25  0:03   ` [RFC][PATCH] new timeofday core subsystem " 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

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=Pine.LNX.4.58.0501241513470.17986@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=Ulrich.Windl@rz.uni-regensburg.de \
    --cc=ak@suse.de \
    --cc=albert@users.sourceforge.net \
    --cc=amax@us.ibm.com \
    --cc=anton@samba.org \
    --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 \
    /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

all inboxes | Powered by JetHome®