* timer question
@ 2002-03-05 13:57 Emmanuel Chaput
0 siblings, 0 replies; 4+ messages in thread
From: Emmanuel Chaput @ 2002-03-05 13:57 UTC (permalink / raw)
To: linux-kernel
Hi !
I have a problem with the first part of run_timer_list() :
if (!tv1.index) {
int n = 1;
do {
cascade_timers(tvecs[n]);
} while (tvecs[n]->index == 1 && ++n < NOOF_TVECS);
}
My problem is that tv*.index is initialized to 0, so the first call to
run_timer_list() will result in a (useless) call to cascade_timers() for
tvecs[1..NOOF_TVECS - 1].
Am I wrong ? Thanks to anyone who could help me !
--
Emmanuel Chaput Dépt Télécom & Réseau, ENSEEIHT
*5 61 58 82 10 (Fax *5 61 58 80 14) Emmanuel.Chaput@enseeiht.fr
^ permalink raw reply [flat|nested] 4+ messages in thread
* timer question
@ 2004-03-31 21:11 Chuck Lever
2004-03-31 21:31 ` Richard B. Johnson
0 siblings, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2004-03-31 21:11 UTC (permalink / raw)
To: Linux Kernel Mailing List
hi all-
i'm looking for a way to do microsecond resolution timing in the RPC
client. i need a timer or timestamp function that is fairly cheap, that i
can call on any hardware platform, and that i can invoke from inside a
bottom half.
any suggestions?
- Chuck Lever
--
corporate: <cel at netapp dot com>
personal: <chucklever at bigfoot dot com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: timer question
2004-03-31 21:11 Chuck Lever
@ 2004-03-31 21:31 ` Richard B. Johnson
2004-04-01 6:10 ` Chris Friesen
0 siblings, 1 reply; 4+ messages in thread
From: Richard B. Johnson @ 2004-03-31 21:31 UTC (permalink / raw)
To: Chuck Lever; +Cc: Linux Kernel Mailing List
On Wed, 31 Mar 2004, Chuck Lever wrote:
> hi all-
>
> i'm looking for a way to do microsecond resolution timing in the RPC
> client. i need a timer or timestamp function that is fairly cheap, that i
> can call on any hardware platform, and that i can invoke from inside a
> bottom half.
>
> any suggestions?
>
> - Chuck Lever
If you find one, we'd all like to use it! The Intel machines,
after the i486, have the rdtsc instruction which will return
the number of CPU clocks that have occurred since the chip was
turned ON. It can be calibrated upon startup so you know how
many clocks occur in a second.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.24 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: timer question
2004-03-31 21:31 ` Richard B. Johnson
@ 2004-04-01 6:10 ` Chris Friesen
0 siblings, 0 replies; 4+ messages in thread
From: Chris Friesen @ 2004-04-01 6:10 UTC (permalink / raw)
To: root; +Cc: Chuck Lever, Linux Kernel Mailing List
Richard B. Johnson wrote:
> On Wed, 31 Mar 2004, Chuck Lever wrote:
>
>
>>hi all-
>>
>>i'm looking for a way to do microsecond resolution timing in the RPC
>>client. i need a timer or timestamp function that is fairly cheap, that i
>>can call on any hardware platform, and that i can invoke from inside a
>>bottom half.
>>
>>any suggestions?
As Dick Johnson said, x86 has rdtsc. PowerPC has the mftbr, which is
equivalent. MIPS has something similar.
Many architectures have something, but currently it has to be coded for
each.
One thing that might be nice would be a common API to get a high-res
timestamp, something like a 64-bit nano_uptime, which would be good for
uptimes of up to 524 years at nanosecond precision. Or else you could
just use timespec, although its not as nice on actual 64-bit machines.
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-04-01 6:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-05 13:57 timer question Emmanuel Chaput
-- strict thread matches above, loose matches on Subject: below --
2004-03-31 21:11 Chuck Lever
2004-03-31 21:31 ` Richard B. Johnson
2004-04-01 6:10 ` Chris Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox