|
From: Jake H. <jh...@an...> - 2004-10-29 21:34:32
|
Maritimus wrote: > > Ok I don't really know this stuff, but will this have a fallback if i586 > time stamp code doesn't work with a particular x86 CPU? > > This looked interesting: > http://www.cs.helsinki.fi/linux/linux-kernel/2001-31/0542.html Hmm.. That is interesting. I know that the "rdtsc" instruction was introduced with the Pentium so it should work on all machines that Syllable currently runs on. Whether it's _accurate_ is a completely different question. In particular, it's definitely not accurate under VMware as it appears to be an emulated instruction, not the real TSC clock, and it slows down massively when the virtual machine manager has to do a lot of emulation of system mode functions. The Linux code appears to fall back to the PIT timer with a warning if the TSC loses too many ticks. The comment at the top of the Linux code for gettimeofday() says that it achieves microsecond accuracy even with the PIT timer so I'm hoping to be able to get the accuracy I need for lmbench one way or the other. Anyway, I'm going to hold off on the timer code for a day or two while I get caught up and submit diffs for my already completed fixes. I've also been writing doxygen comment blocks for all the kernel functions after I got sick of looking at all those empty comment blocks. It's a bit tedious but the end result should be quite nice looking. I'm tagging all of the private functions with "\ingroup Internal" so they show up in their own module, and I will make a group for each set of related kernel functions, e.g. Areas, Semaphores, Networking, VFS. -Jake |