lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6babb600611270923h139a59ecr82af786f3aedf607@mail.gmail.com>
Date:	Mon, 27 Nov 2006 10:23:17 -0700
From:	"Robert Crocombe" <rcrocomb@...il.com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [patch] x86: unify/rewrite SMP TSC sync code

The difference that Wink reports is tiny compared to that measured on
my Opteron machines:

dual (2.6.17):

rcrocomb@...fires-aptest:cyclecounter_test$ ./rdtsc-pref 1000000
rdtsc:   average ticks=  10
gtod:    average ticks=4296
gtod_us: average ticks=4328

quad (2.6.16-rt29):

rcrocomb@...nky:wink_saville_test$ ./rdtsc-pref 1000000
rdtsc:   average ticks=  10
gtod:    average ticks=5688
gtod_us: average ticks=5711

I have my own little test that I'll attach, but it gives a similar
result.  Here are the results from the 2x box:

rcrocomb@...fires-aptest:cyclecounter_test$ ./timing
Using the cycle counter
Calibrated timer as 2593081969.758825 Hz
4194304 iterations in 0.016 seconds is 0.004 useconds per iteration.

rcrocomb@...fires-aptest:cyclecounter_test$ ./timing_gettimeofday
Using gettimeofday
4194304 iterations in 6.793 seconds is 1.620 useconds per iteration.

I have used the pthread affinity and/or cpuset, etc. mechanisms to try
and inject some reliability into the measurement.

Using gtod() can amount to a substantial disturbance of the thing to
be measured.  Using rdtsc, things seem reliable so far, and we have an
FPGA (accessed through the PCI bus) that has been programmed to give
access to an 8MHz clock and we do some checks against that.

-- 
Robert Crocombe
rcrocomb@...il.com

View attachment "timing.cpp" of type "text/x-c++src" (3566 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ