Re: Get UTC from RDTSC

2010-07-20 Thread Pei Lin
2010/7/17 Radhesh Kamath rmk.l...@gmail.com: On Fri, Jul 16, 2010 at 12:36 PM, Jan Ceuleers jan.ceule...@computer.org wrote: On 15/07/10 18:42, Radhesh Kamath wrote: I have a kernel module that sends me an RDTSC value to userspace, and I need to get a UTC timestamp based on this. As far as I

Re: Get UTC from RDTSC

2010-07-20 Thread Asael Temple
On Tue, 20 Jul 2010 20:06:27 -0700, Pei Lin telent...@gmail.com wrote: 2010/7/17 Radhesh Kamath rmk.l...@gmail.com: On Fri, Jul 16, 2010 at 12:36 PM, Jan Ceuleers jan.ceule...@computer.org wrote: On 15/07/10 18:42, Radhesh Kamath wrote: I have a kernel module that sends me an RDTSC value to

Re: Get UTC from RDTSC

2010-07-18 Thread Raz
On Sun, Jul 18, 2010 at 5:32 AM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: Here I see you begun to understand... now since I forgot what's that CMOS clock real name isI can no longer help.. how about checking what gettimeofday() syscall really does? you can boot kernel with

Re: Get UTC from RDTSC

2010-07-17 Thread Mulyadi Santosa
On Sat, Jul 17, 2010 at 07:57, Radhesh Kamath rmk.l...@gmail.com wrote: The CPU frequency is not varied, so a tick will represent the same amount of time. So the question is, how do I arrive at a UTC value? Nice conclusion, but back again, how do you conclude current time if you just use TSC

Re: Get UTC from RDTSC

2010-07-17 Thread Mulyadi Santosa
Here I see you begun to understand... now since I forgot what's that CMOS clock real name isI can no longer help.. how about checking what gettimeofday() syscall really does? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training:

Re: Get UTC from RDTSC

2010-07-16 Thread luca ellero
Mulyadi Santosa ha scritto: Hi On Thu, Jul 15, 2010 at 23:42, Radhesh Kamath rmk.l...@gmail.com wrote: Hi list, Apologies if this is not purely a kernel-related question: I have a kernel module that sends me an RDTSC value to userspace, and I need to get a UTC timestamp based on this. As

Re: Get UTC from RDTSC

2010-07-16 Thread Jan Ceuleers
On 15/07/10 18:42, Radhesh Kamath wrote: I have a kernel module that sends me an RDTSC value to userspace, and I need to get a UTC timestamp based on this. As far as I understand, RDTSC gives me the clock ticks that have elapsed since the processor was switched on (this is a 64-bit machine,

Re: Get UTC from RDTSC

2010-07-16 Thread Radhesh Kamath
On Fri, Jul 16, 2010 at 12:36 PM, Jan Ceuleers jan.ceule...@computer.org wrote: On 15/07/10 18:42, Radhesh Kamath wrote: I have a kernel module that sends me an RDTSC value to userspace, and I need to get a UTC timestamp based on this. As far as I understand, RDTSC gives me the clock ticks

Get UTC from RDTSC

2010-07-15 Thread Radhesh Kamath
Hi list, Apologies if this is not purely a kernel-related question: I have a kernel module that sends me an RDTSC value to userspace, and I need to get a UTC timestamp based on this. As far as I understand, RDTSC gives me the clock ticks that have elapsed since the processor was switched on

Re: Get UTC from RDTSC

2010-07-15 Thread Mulyadi Santosa
Hi On Thu, Jul 15, 2010 at 23:42, Radhesh Kamath rmk.l...@gmail.com wrote: Hi list, Apologies if this is not purely a kernel-related question: I have a kernel module that sends me an RDTSC value to userspace, and I need to get a UTC timestamp based on this. As far as I understand, RDTSC