> Finally, one question as I could not find the code for gethrtime(): On current x86 boxes, it should be using tsc_gethrtime() and friends to implement the gethrtime() kernel function:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/i86pc/os/timestamp.c > is CPU frequency scaling always considered? gethrtime() is defined to return time expressed in nanoseconds; it doesn't matter at what CPU frequency the pm enabled processor is currently running. Inside the kernel there also is gethrtime_unscaled(). This returns raw cpu clock ticks (raw TSC counter register values on the x86 platform). This function would be affected by CPU frequency scaling on *old* x86 cpus, and I guess that's the reason why Solaris doesn't support cpu pm / CPU frequency scaling on these old cpus. The latest version of Intel / AMD cpus have support for invariant TSC, which isn't affected by cpu pm any more. This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code