All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: high-res-timers start code.
@ 2001-04-23 21:25 Robert H. de Vries
  0 siblings, 0 replies; 4+ messages in thread
From: Robert H. de Vries @ 2001-04-23 21:25 UTC (permalink / raw)
  To: high-res-timers-discourse, linux-kernel@vger.kernel.org


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-24 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2001-04-23 21:25 Robert H. de Vries

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.