[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48503CA3.9060808@compro.net>
Date: Wed, 11 Jun 2008 16:59:15 -0400
From: Mark Hounschell <markh@...pro.net>
To: Arjan van de Ven <arjan@...radead.org>
CC: "linux-os (Dick Johnson)" <linux-os@...logic.com>,
Jan Engelhardt <jengelh@...ozas.de>,
"Kok, Auke" <auke-jan.h.kok@...el.com>,
solsTiCe d'Hiver <solstice.dhiver@...il.com>,
linux-kernel@...r.kernel.org
Subject: Re: PROBLEM: no cpu MHz in /proc/cpuinfo on 2.6.25.4-rt6
Arjan van de Ven wrote:
> On Wed, 11 Jun 2008 16:37:38 -0400
>>> Mark
>>>
>> Ok, what would one use besides the tsc to take a fast high-res time
>> stamp in a kernel module that could also be used in user land (same
>> time source) to for instance calculate the the time between an event
>> in the kernel to an event in user land?
>>
>> do_gettimeofday / gettimeofday are not really acceptable.
>
>
> why not? both of these (they're teh same) are the best the kernel can
> do. If there was a better way to do it, gettimeofday() would use it.
> It's not even a system call if we can get away with it
> (although system calls are pretty cheap)
>
> really, think about it. if there was a better way, gettimeofday() would
> use it.
>
>
The results of gettimeofday are worse that what you describe about the tsc.
NTP etc... and take considerably longer the a tsc read.
Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists