From: Nicolas Pitre <nico@cam.org>
To: George Anzinger <george@wildturkeyranch.net>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>, Andi Kleen <ak@suse.de>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: sched_clock() uses are broken
Date: Thu, 04 May 2006 10:18:35 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0605040924490.28543@localhost.localdomain> (raw)
In-Reply-To: <44597A19.7050107@wildturkeyranch.net>
On Wed, 3 May 2006, George Anzinger wrote:
> Nicolas Pitre wrote:
> > Yet that counter isn't necessarily nanosecond based. So rescaling the
> > returned value to nanosecs requires expensive divisions which could be done
> > only once within sched_clock_diff() instead of twice as often in each
> > sched_clock() calls.
>
> Oh phooey!! Scaling can be done with a mpy and a shift. See the new clock
> code where the TSC (or what ever) is scaled to ns.
I know.
And if you want to preserve more than 32 bits of precision you need 4
mpy_and_add insns with a shift on ARM at least.
But the point remains that it is more efficient to do it once rather
than twice or more.
Nicolas
next prev parent reply other threads:[~2006-05-04 14:18 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 13:29 Russell King
2006-05-02 14:21 ` Nick Piggin
2006-05-02 16:43 ` Andi Kleen
2006-05-02 16:50 ` Russell King
2006-05-02 17:01 ` Andi Kleen
2006-05-02 17:18 ` Nicolas Pitre
2006-05-02 18:55 ` Russell King
2006-05-02 19:05 ` Nicolas Pitre
2006-05-02 19:08 ` Russell King
2006-05-02 19:23 ` Nicolas Pitre
2006-05-02 21:35 ` Russell King
2006-05-02 17:15 ` Nicolas Pitre
2006-05-04 3:50 ` George Anzinger
2006-05-04 14:18 ` Nicolas Pitre [this message]
2006-05-02 16:54 ` Christopher Friesen
2006-05-02 16:59 ` Andi Kleen
2006-05-02 17:07 ` Nick Piggin
2006-05-03 7:09 ` Mike Galbraith
2006-05-03 7:40 ` Andi Kleen
2006-05-03 9:11 ` Mike Galbraith
2006-05-03 9:16 ` Andi Kleen
2006-05-03 9:31 ` Mike Galbraith
2006-05-07 12:33 ` Nick Piggin
2006-05-07 12:43 ` Russell King
2006-05-07 12:56 ` Nick Piggin
2006-05-07 13:00 ` Nick Piggin
2006-05-07 13:18 ` Russell King
2006-05-07 13:30 ` Nick Piggin
2006-05-07 13:55 ` Russell King
2006-05-07 14:04 ` Nick Piggin
2006-05-07 16:03 ` Andi Kleen
2006-05-07 16:53 ` Russell King
2006-05-07 17:52 ` Mike Galbraith
2006-05-07 17:37 ` Mike Galbraith
2006-05-07 17:32 ` Mike Galbraith
2006-05-08 4:14 ` Mike Galbraith
2006-05-08 4:37 ` Mike Galbraith
2006-05-08 4:46 ` Nick Piggin
2006-05-08 5:24 ` Mike Galbraith
2006-05-08 5:30 ` Nick Piggin
2006-05-04 20:02 ` Florian Paul Schmidt
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.64.0605040924490.28543@localhost.localdomain \
--to=nico@cam.org \
--cc=ak@suse.de \
--cc=george@wildturkeyranch.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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®