Your best source of information and news about hardware , vista and hardware on the internet 你最好的信息來源和新聞有關的硬件, Vista和硬件上互聯網

Vista ARTICLES Vista的文章 TOP 50排名前50位 Spyware Virus間諜軟件病毒 Vista SOFT Vista的軟 Vista HELP Vista幫助

Problems with QueryPerformanceCounter on Windows Server 2003 Multi-Processor Hyper-V guests? QueryPerformanceCounter問題在Windows Server 2003多處理器超電壓的來賓嗎? Here’s why.這也是為什麼。


A friend of mine from another group came to me with a problem he’s been having on some Windows Server 2003 guests.我的一位朋友從另一組來到我一個問題他已經有一些Windows Server 2003的客人。

They’re doing some nifty stuff with the .NET他們正在做一些漂亮的東西在。 NET Stopwatch()秒錶( ) class, and some WPF animations, which uses the一流的,和一些上頭的動畫,它使用 QueryPerformanceCounter Win32 API to figure out the timing during the animations.  Apparently, when they run their code in Hyper-V, the animations look sort of… not good. Win32 API的找出時間在動畫。顯然,當他們的代碼運行在高電壓,動畫看看那種...並不好。

They’re using Windows Server 2003 SP2 x86, which has been allocated two virtual processors.他們正在使用的Windows Server 2003 SP2的x86 ,其中已撥出兩個虛擬處理器。

It turns out that our performance guru, Tony Voellm, has already encountered something like this.  From Tony’s結果表明,我們的表現大師,托尼Voellm已經遇到這樣的事情。從托尼的 blog post博客帖子 :

The root issue comes about from the Win32 QueryPerformanceCounter function.  By default it uses a time source called the TSC.  This is a CPU time source that essentially counts CPU cycles.  The TSC for each (virtual) processor can be different so there is no guarantee that reading TSC on one processor has anything to do with reading TSC on another processor.  This means back to back reads of TSC on different VP's can actually go backwards. 問題的根源是對從Win32的QueryPerformanceCounter功能。默認情況下它使用的時間源稱為台糖。這是一個CPU的時間源,基本上計數的CPU週期。台糖的每一個(虛擬的)處理器可以是不同的,因此不能保證閱讀台糖在一個處理器有什麼閱讀台糖在另一個處理器。這意味著背對背台糖內容的副總裁在不同的實際上可以倒退。 Hyper-V guarantees that TSC will not go backwards on a single VP. 高電壓保證,台糖不會倒退的一個副總裁。

The fix for this is to modify the guest’s BOOT.INI file by adding the該修復,這是修改客人的BOOT.INI文件,增加 /USEPMTIMER / USEPMTIMER switch to your operating system’s boot entry.  This tells the system to use a different timer for QueryPerformanceCounter-related tasks, and should alleviate the problem.切換到作業系統的啟動項。這說明該系統使用不同的定時器QueryPerformanceCounter有關任務,並應當使問題得到緩解。

Popularity: 1%人氣: 1 %


Written by mikekol. 撰稿mikekol 。 Read more great feeds at is source 閱讀更多的是供稿源 WEBSITE 網站
no comments 評論沒有 .
Read more articles on 閱讀更多文章 Hyper-V RTM 超電壓RTM and otherSoftware otherSoftware and Miscellaneous V 雜項V .

Related articles相關文章

No comments沒有意見

There are still no comments on this article.還有沒有評論文章。

Leave your comment...離開您的評論...

If you want to leave your comment on this article, simply fill out the next form:如果您要離開您的評論文章,只需填寫下一形式:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .您可以使用這些的XHTML標籤: href="" title="">的<a <abbr title="">的<b> <acronym title="">的<code> <blockquote cite="">的<em> “字母i “ <strike>的<strong> 。