On Mon, Jul 09, 2018 at 12:16:27PM -0400, valdis.kletnieks@vt.edu wrote:
On Mon, 09 Jul 2018 19:34:44 +0530, Himanshu Jha said:
I think for these benchmarking stuff, to evaluate the cycles and time correctly you should use the __rdtscp(more info at "AMD64 Architecture Programmer???s Manual Volume 3: General-Purpose and System Instructions" Pg 401)
Just beware that many Intel (and maybe some AMD) chipsets have a non-constant TSC frequency. Check /proc/cpuinfo for 'constant_tsc' before relying on the value.
How about setting "performance" governor[1] for all CPUs ? Would that work ? I mean no throttle down, but not sure if we have a constant cpufreq. Something like the following script: for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do [ -f $CPUFREQ ] || continue; echo -n performance > $CPUFREQ; done [1] https://www.kernel.org/doc/html/v4.14/admin-guide/pm/cpufreq.html#performanc... -- Himanshu Jha Undergraduate Student Department of Electronics & Communication Guru Tegh Bahadur Institute of Technology