Switch to Linear ModeSwitch to Hybrid ModeSwitch to Threaded Mode
Printer Friendly View | Email this page | Register Now to enjoy user benefits!
universe Registered User
Join Date: Mar 2002
Posts: 2,326
Trade rep: 100%
RDTSC in multi-core processor universe Aug 12th, 09, 04:11 PM #1 (permalink)
have 2 sets of PCs.
1 set is using Xeon 5150 CPU and the other is using Xeon 5450.

Both sets are using the same codes to obtain RDTSC to obtain high performance timer. However, the Xeon 5450 is able to give me the correct timing, whereas the Xeon 5150 is unable to give me the correct timing (ie, there are spikes in the reading, most likely due to a 'desync' between the time stamp counter between the cores).

However, since the original code does not set the affinity when getting the RDTSC, and I do now wish to change the code to do so, I'm wondering if there's any 'tool' to sync the timestamp on the cpus? or another workabout (i know that i can use task manager to set affinity, but it's too troublesome)

Do not argue with idiots, they will bring you down to their level and beat you with experience.
 
ClementChong Registered User
Join Date: Aug 2008
Posts: 54
Trade rep: 0%
Thanked 1 Times in 1 Post
ClementChong Aug 12th, 09, 09:34 PM #2 (permalink)
Due to CPU power management, RDTSC is no longer a accurate way to do time keeping (especially in multiprocessor scenarios).

In Windows, Microsoft recommends using "QueryPerformanceCounter" and "QueryPerformanceFrequency" APIs for high resolution time keeping.
Modern x86 hardware should have other external clocks that can be used for accurate timekeeping even though it is not as fast as the processor itself (e.g. ACPI PM Timer @ 3.579545MHz, HPET @ 14.318180MHz)
Windows will use these timers for "QueryPerformanceCounter" and "QueryPerformanceFrequency" if the timers can be correctly detected by Windows (else it will just fallback to RDTSC).
 
universe Registered User
Join Date: Mar 2002
Posts: 2,326
Trade rep: 100%
universe Aug 14th, 09, 10:51 PM #3 (permalink)
QueryPerformanceCounter is too slow for my purpose. I've done profiling, and the overhead incurred by QueryPerformanceCounter is not acceptable in my system
also, Xeon5450 seems to be working fine with RDTSC while 5150 does not
also, AMD has drivers that sync the timestamp of the cores. Wonder does Xeon5150 have similar stuff.

Do not argue with idiots, they will bring you down to their level and beat you with experience.
 
New Thread | ↑↓ Similar Threads
Similar Threads Thread Starter Forum Replies Last Post
deathism Singapore Marketplace / Garage Sales 16 Feb 22nd, 09
04:13 PM
bullydog News around the web! 14 Apr 20th, 08
02:07 PM
reddevil0728 News around the web! 12 Feb 27th, 07
11:18 PM
HangLoose Hardware Arena 3 Oct 31st, 06
02:24 PM
Thread Tools Display Modes
Linear Mode Linear Mode
Find the best hotel rates here:
Destination:

City:

Check in Date:


Nights:
Rooms:
Adult(s):
Children:
travel.vr-zone.com
OCZ Fan Club!
OCZ Fan Club 21 OCZ Fans!
Win Visa GiftCard
Win Visa Gift Card