Re: QueryPerformanceCounter() on multiprocessor???
- From: "Jan Bruns" <testzugang_janbruns@xxxxxxxx>
- Date: Mon, 25 Jun 2007 19:41:34 +0200
"Arkady Frenkel":
<maruk2@xxxxxxxxxxx> wrote in message
OTOH I see that point 3 in paragraph "Background" contradict to
point 5 in paragraph "Recommendations"
The background section talks about about floating CPU-frequency, that
implies inconsitent CPU-cycle intervalls. This doesn't necessarily
change the APIs timer precision, because the system could take
changes in CPU-frequency into account (or even use a CPU-independent
timing source).
How the "main thread" would update the timestamp? The timestamp would
have to be continuously updated by the "main thread" or updated on
demand.
If the system doesn't have any high precision timing sources other than
the one built into the CPUs, it will probably prefer to choose one
specific CPU as source, to avoid incorrectness depending on wich
CPU calls the timing API.
So if thread actually running on a non-timing-source CPU attempts
to read the timestamp, it might be either moved to the timig-CPU,
or at least interupt the timing-CPU to instruct it to deliver
the timestamp.
I'm quite sure that Chuck Walbourn didn't mean you should use a
timestamp-reader-thread, that continiously read the timer to
write the result to some global variabe.
Perhaps better read it like "Avoid having all threads rely on
timestamp-reads. Be prepared for scenarios, where threads that
read timestamps can only be executed on a specific core".
Gruss
Jan Bruns
.
- Follow-Ups:
- Re: QueryPerformanceCounter() on multiprocessor???
- From: maruk2@xxxxxxxxxxx
- Re: QueryPerformanceCounter() on multiprocessor???
- References:
- QueryPerformanceCounter() on multiprocessor???
- From: maruk2@xxxxxxxxxxx
- Re: QueryPerformanceCounter() on multiprocessor???
- From: Arkady Frenkel
- QueryPerformanceCounter() on multiprocessor???
- Prev by Date: Re: Registry access on another Windows Installation
- Next by Date: Re: Memory Leak Detector
- Previous by thread: Re: QueryPerformanceCounter() on multiprocessor???
- Next by thread: Re: QueryPerformanceCounter() on multiprocessor???
- Index(es):
Relevant Pages
|