Re: how to calculate time required for the execution of the entry point of the driver ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 30, 2008 at 2:51 PM, Michael Blizek
<michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi!
>
> On 13:43 Sun 30 Nov     , Mulyadi Santosa wrote:
>> Hi All
>
> ...
>
>> 2. I suggest to use TSC (TimeStamp Clock) if you use x86 (32 and 64
>> bit). I don't say gettimeofday() won't meet your need, but I think
>> reading TSC register is the fastest code path you can get to measure
>> timing.
>
> This sounds great. See http://en.wikipedia.org/wiki/Time_Stamp_Counter
>
> This seems to have some implications:
> - The timestamp counter is not synchronized on all CPUs/cores ==> set the CPU
> affinity before starting the Benchmark.
> - The time unit is CPU clock cycles or something else (processor dependant),
> not microseconds. Frequency scaling and maybe APM_CPU_IDLE are probably not
> such a great idea...

yes, you're correct, I forgot about frequency scaling that certainly
affects TSC.

NB: This is why I like this kind of discussion, it makes everybody smarter...

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux