From: "Lee Revell" <rlrevell@joe-job.com>
To: "Chris Friesen" <cfriesen@nortel.com>,
"Arjan van de Ven" <arjan@infradead.org>
Cc: "Robert Love" <rml@novell.com>,
"Mikael Starvik" <mikael.starvik@axis.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: Accessing monotonic clock from modules
Date: Fri, 3 Jun 2005 23:27:17 -0400 [thread overview]
Message-ID: <05df01c568b5$7d541980$0100a8c0@krustophenia> (raw)
In-Reply-To: 429F15DA.8030205@nortel.com
> Arjan van de Ven wrote:
>> On Thu, 2005-06-02 at 07:46 -0600, Chris Friesen wrote:
>
>>>For ourselves we implemented an clock interface for a limited subset of
>>>architectures that provides a fast timestamp in kernel and userspace.
>>>
>>>Basically it has one call to return a 64-bit timestamp, and another call
>>>to tell you how fast the clock is ticking.
>>
>>
>> hmm this is tricky if cpufreq actually varies cpu speeds... you would
>> need to not cache the "how fast it ticks" for too long.
>
> Luckily we didn't need to deal with that.
>
> In order to use the fast versions with varying frequency you'd need some
> kind of notification to all users when the frequency changes.
>
> Alternately, on architectures where clock_gettime doesn't require the
> overhead of a syscall, you could just use that.
JACK also implements a fast high-res timer for each supported arch. We
can't use gettimeofday as it's about 50x slower than rdtsc (tested it just
now).
I suggested using the kernel events mechanism to notify userspace when
the CPU speed changes a few months ago, for this exact reason.
Lee
next prev parent reply other threads:[~2005-06-04 3:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-02 6:36 Accessing monotonic clock from modules Mikael Starvik
2005-06-02 7:29 ` Arjan van de Ven
2005-06-02 7:30 ` Arjan van de Ven
2005-06-02 7:40 ` Robert Love
2005-06-02 7:48 ` Arjan van de Ven
2005-06-02 7:52 ` Robert Love
2005-06-02 7:56 ` Arjan van de Ven
2005-06-02 13:46 ` Chris Friesen
2005-06-02 13:48 ` Arjan van de Ven
2005-06-02 14:21 ` Chris Friesen
2005-06-04 3:27 ` Lee Revell [this message]
2005-06-04 21:48 ` Lee Revell
2005-06-03 0:14 ` Gerald Britton
[not found] <BFECAF9E178F144FAEF2BF4CE739C66802FA37AC@exmail1.se.axis.com>
2005-06-02 10:57 ` Mikael Starvik
2005-06-02 11:15 ` Arjan van de Ven
[not found] <BFECAF9E178F144FAEF2BF4CE739C66802FA3913@exmail1.se.axis.com>
2005-06-02 12:40 ` Mikael Starvik
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='05df01c568b5$7d541980$0100a8c0@krustophenia' \
--to=rlrevell@joe-job.com \
--cc=arjan@infradead.org \
--cc=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikael.starvik@axis.com \
--cc=rml@novell.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