Your best source of information and news about windows vista , windows vista and BIOS on the internet 你最好的信息来源和新闻有关 Windows Vista , Windows Vista BIOS在互联网上

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> 。