From: "Robert H. de Vries" <rhdv@rhdv.cistron.nl> (by way of Robert H. de Vries <rhdv@rhdv.cistron.nl>)
To: high-res-timers-discourse@lists.sourceforge.net,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: high-res-timers start code.
Date: Mon, 23 Apr 2001 23:25:32 +0200 [thread overview]
Message-ID: <01042323253201.18984@calvin> (raw)
On Monday 23 April 2001 22:43, George Anzinger wrote:
> "Robert H. de Vries" wrote:
> > On Monday 23 April 2001 19:45, you wrote:
> > > By the way, is the user land stuff the same for all "arch"s?
> >
> > Not if you plan to handle the CPU cycle counter in user space. That is at
> > least what I would propose.
>
> Just got interesting, lets let the world look in.
>
> What did you have in mind here? I suspect that on some archs the cycle
> counter is not available to user code. I know that on parisc it is
> optionally available (kernel can set a bit to make it available), but by
> it self it is only good for intervals. You need to peg some value to a
> CLOCK to use it to get timeofday, for instance.
>
> On the other hand, if there is an area of memory that both users and
> system can read but only system can write, one might put the soft clock
> there. This would allow gettimeofday (with the cycle counter) to work
> without a system call. To the best of my knowledge the system does not
> have such an area as yet.
It obviously is an architecture dependent thing. I know of two archtictures
which have such a counter: your standard pentium and up and the SGI systems
from at least the Indy and up. I wouldn't be surprised if most CPU's have
such a counter. If you look at some of the architecture specific code for the
gettimeofday code you would quickly find out which architectures have such a
feature. I have some code for the intel in my user space library. For the SGI
I also have some code, but only for IRIX. I guess for Linux we could do
similar code.
Robert
--
Robert de Vries
rhdv@rhdv.cistron.nl
next reply other threads:[~2001-04-23 21:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-23 21:25 Robert H. de Vries [this message]
[not found] <3AE45D01.F7B91E73@mvista.com>
[not found] ` <01042319085701.01113@calvin>
[not found] ` <3AE46A37.A0AF78BC@mvista.com>
[not found] ` <01042320013203.01113@calvin>
2001-04-23 20:43 ` high-res-timers start code george anzinger
2001-04-24 10:42 ` Gabriel Paubert
2001-04-24 14:52 ` george anzinger
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=01042323253201.18984@calvin \
--to=rhdv@rhdv.cistron.nl \
--cc=high-res-timers-discourse@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.